Skip to content

Instantly share code, notes, and snippets.

@aeldar
Last active August 15, 2019 21:22
Show Gist options
  • Save aeldar/9d6577ab8328050ba3ff3e70650d3184 to your computer and use it in GitHub Desktop.
Save aeldar/9d6577ab8328050ba3ff3e70650d3184 to your computer and use it in GitHub Desktop.
`jq` command with parameters, allowed to convert ENV to json and filter ENV variables by prefix
jq -n 'env | to_entries | map(select(.key | startswith("MY_PREFIX_"))) | from_entries'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment