Skip to content

Instantly share code, notes, and snippets.

@nmccready
Created April 23, 2019 20:16
Show Gist options
  • Select an option

  • Save nmccready/e766ab5ba53c2b34e51fa03d89a7ff22 to your computer and use it in GitHub Desktop.

Select an option

Save nmccready/e766ab5ba53c2b34e51fa03d89a7ff22 to your computer and use it in GitHub Desktop.

Revisions

  1. nmccready created this gist Apr 23, 2019.
    10 changes: 10 additions & 0 deletions arguments.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    #!/bin/sh
    set -e
    set -o pipefail

    # collect arguments to forward on
    while [[ "$#" > 0 ]]; do case $1 in
    # example to save value
    # -v|--data-volume) shift; dataVolume=$1;; # --data-volume someval
    *) args[${#args[@]}]=$1;;
    esac; shift; done