Created
July 13, 2022 08:23
-
-
Save khaliqgant/7a529a9eface4d90a277428f1474bb3e to your computer and use it in GitHub Desktop.
[Bash Default Value] Fallback Variable For Bash #bash #cli
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
environment=${1:-develop} | |
FOO="${VARIABLE:=default}" | |
https://stackoverflow.com/questions/2013547/assigning-default-values-to-shell-variables-with-a-single-command-in-bash | |
https://stackoverflow.com/questions/9332802/how-to-write-a-bash-script-that-takes-optional-input-arguments |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment