ibfnrw
Last Updated: April 21, 2017
·
95
· fr0gs

[Bash]: Check if environment variables are set and if not assign them a default value.

env_variable=$(printenv ENV_VAR)
variable=${env_variable:-"my default value"}
Filed Under