Created
December 2, 2016 09:56
-
-
Save oneandoneis2/d07bb779c26c993908605d3a45a63322 to your computer and use it in GitHub Desktop.
Params with default values in Bash
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
#!/bin/bash | |
# Default param values | |
foo=${1:-"The first entry"} | |
bar=${2:-"The second entry"} | |
echo $foo | |
echo $bar | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment