Skip to content

Instantly share code, notes, and snippets.

@srkiNZ84
Created November 5, 2017 23:53
Show Gist options
  • Save srkiNZ84/481180720a7c3258cdaa5a2fbf803967 to your computer and use it in GitHub Desktop.
Save srkiNZ84/481180720a7c3258cdaa5a2fbf803967 to your computer and use it in GitHub Desktop.
Bash example how to check whether env vars are set
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