Skip to content

Instantly share code, notes, and snippets.

@rodrigotassinari
Created March 17, 2015 19:07
Show Gist options
  • Save rodrigotassinari/ca950eae2bd056693e18 to your computer and use it in GitHub Desktop.
Save rodrigotassinari/ca950eae2bd056693e18 to your computer and use it in GitHub Desktop.
bash syntax to define defaults if no environment values are set
$ FOO=1234
$ echo ${FOO} ${BAR}
> 1234
$ echo ${FOO:-555} ${BAR:-666}
> 1234 666
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment