Skip to content

Instantly share code, notes, and snippets.

@oneandoneis2
Created December 2, 2016 09:56
Show Gist options
  • Save oneandoneis2/d07bb779c26c993908605d3a45a63322 to your computer and use it in GitHub Desktop.
Save oneandoneis2/d07bb779c26c993908605d3a45a63322 to your computer and use it in GitHub Desktop.
Params with default values in Bash
#!/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