Skip to content

Instantly share code, notes, and snippets.

@sarnobat
Last active September 21, 2017 21:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sarnobat/7fd85aa22706f304ad8ff377c60c6bf1 to your computer and use it in GitHub Desktop.
Save sarnobat/7fd85aa22706f304ad8ff377c60c6bf1 to your computer and use it in GitHub Desktop.
## default value
URL=${1:-"https://www.amazon.com/War-That-Made-America-French/dp/B000E1MXZ0"}
## Error message and exit with non zero status
${1:?"You didn't pass a value, exiting"}
## No need for this (even Bourne Shell has shorthands)
if [ -n "$1" ];
then
URL="$1"
else
URL="https://www.amazon.com/War-That-Made-America-French/dp/B000E1MXZ0"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment