added an environment variable example

master
androiddrew 5 years ago
parent 20bf745c8e
commit dd2485c1e0

@ -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
Loading…
Cancel
Save