Created
November 27, 2016 13:29
-
-
Save krstffr/6a71b913fd4d642b8086ee69f0e93333 to your computer and use it in GitHub Desktop.
Getting all your Heroku env vars from all your apps listed in one file!
This file contains hidden or 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
# First store all of your apps in a file | |
heroku apps > heroku-apps.txt | |
# Manually remove everything which is not an app name from the file, for example the first line ("=== [email protected] Apps") | |
# (Now you should have a file with only one appname per line) | |
# Pipe the text file into xargs -n1, which in turn passes every line into the "heroku-config -a $1" command, and then | |
# pass the result of that into the heroku-apps-with-config.txt | |
cat heroku-apps.txt | xargs -n1 heroku config -a $1 > heroku-apps-with-config.txt | |
# Get all of the env vars! | |
cat heroku-apps-with-config.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment