Last active
March 8, 2017 11:00
-
-
Save jonatanblue/a63c91f8167566455071a611d5aeb001 to your computer and use it in GitHub Desktop.
Export secret variable on the command line without writing to history
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
#!/bin/bash | |
# | |
# Set a secret environment variable on the command line without saving it in history: | |
export MY_TOKEN="$(read token && echo ${token})" | |
# type/paste secret value | |
echo ${MY_TOKEN} | |
# value is echoed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment