ibfnrw
Last Updated: April 21, 2017
·
5
· fr0gs
Doggy

[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"}