diff --git a/scripts/env_example.sh b/scripts/env_example.sh new file mode 100755 index 0000000..8d8d15b --- /dev/null +++ b/scripts/env_example.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +# This example demonstrates that if the BASH_ENV_EX environment variable is set then it will print it out +# If not it assigns a default as an empty string which will evaluate to false. + +set -e + +if [ -n "${BASH_ENV_EX:-}" ]; then + echo $BASH_ENV_EX +else + echo "You didn't set the BASH_ENV_EX" +fi