#!/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