Created
November 5, 2017 23:53
-
-
Save srkiNZ84/481180720a7c3258cdaa5a2fbf803967 to your computer and use it in GitHub Desktop.
Bash example how to check whether env vars are set
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
if [[ -z $FOO || -z $BAR ]] | |
then | |
echo "Either FOO, BAR (or both) not set" | |
exit 1 | |
fi | |
echo "FOO and BAR must be set" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment