bash# require variables# REQUIRED_VARS=( FOO_VAR BAR_VAR BAZ_VAR ) for v in ${REQUIRED_VARS[@]}; do if [[ -z "${!v}" ]]; then echo "${v} environment variable is not populated" fi doneResources# GNU Bash Reference Manual Google Shell Style Guide