Last active
August 15, 2019 21:22
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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