Skip to content

Instantly share code, notes, and snippets.

@iperdomo
Created March 5, 2014 16:28
Show Gist options
  • Select an option

  • Save iperdomo/9370646 to your computer and use it in GitHub Desktop.

Select an option

Save iperdomo/9370646 to your computer and use it in GitHub Desktop.
#/bin/bash
set -e
[[ -n "${MYENV}" ]] || { echo "MYENV needs to be declared"; exit 1; }
echo "everything OK"
@iperdomo
Copy link
Copy Markdown
Author

iperdomo commented Mar 5, 2014

MYENV=foo ./env-var.sh
everything OK

./env-var.sh 
MYENV needs to be declared

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment