Skip to content

Instantly share code, notes, and snippets.

@skulbrane
Last active December 11, 2016 03:59
Show Gist options
  • Save skulbrane/1032a07f09dbfa0930ce7e17eb843b56 to your computer and use it in GitHub Desktop.
Save skulbrane/1032a07f09dbfa0930ce7e17eb843b56 to your computer and use it in GitHub Desktop.

Revisions

  1. skulbrane revised this gist Dec 11, 2016. No changes.
  2. skulbrane created this gist Dec 11, 2016.
    7 changes: 7 additions & 0 deletions bash-def-cmdarg.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    #!/bin/bash


    default_value=-1

    value=${1:-$default_value}
    echo value=$value