Created
November 11, 2019 05:48
-
-
Save deepakduggirala/50b845043ea2d88775d006d19dae2047 to your computer and use it in GitHub Desktop.
Give values to input parameters/arguments when not explicitly provided
This file contains 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
#VAR=${1:-DEFAULTVALUE} | |
#https://coderwall.com/p/s8n9qa/default-parameter-value-in-bash | |
filename=$1 | |
privatekey="${2:-/Users/user1/.keys/private.pem}" | |
publickey="${3:-/Users/user1/.keys/public.pem}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment