greycat 1210791765 learn For getopts examples, see http://wooledge.org/mywiki/BashFAQ/035 ferret 1235026580 forget ferret 1235026611 learn Tutorial: http://bash-hackers.org/wiki/doku.php/howto/getopts_tutorial Examples: http://mywiki.wooledge.org/BashFAQ/035 geirha 1276175922 forget geirha 1276175934 learn Tutorial: http://wiki.bash-hackers.org/howto/getopts_tutorial Examples: http://mywiki.wooledge.org/BashFAQ/035 Riviera 1390006744 forget Riviera 1390006749 learn while getopts ab: name; do case $name in a) a=1;; b) b=$OPTARG;; ?) echo invalid;; esac; done; shift $((OPTIND - 1)) # Tutorial: http://wiki.bash-hackers.org/howto/getopts_tutorial Examples: http://mywiki.wooledge.org/BashFAQ/035 tirnanog 1687703537 forget tirnanog 1687703649 learn while getopts ab: name; do case $name in a) a=1;; b) b=$OPTARG;; *) exit 1;; esac; done; shift $((OPTIND - 1)) # Tutorial: http://wiki.bash-hackers.org/howto/getopts_tutorial Examples: http://mywiki.wooledge.org/BashFAQ/035 Guest19 1687703882 forget Guest19 1687704196 learn while getopts ab: opt; do case $opt in a) a=1;; b) b=$OPTARG;; '?') exit 1; esac # If unexpected option will be passed in arguments, getopts will print its own error message. Read what is printed by help getopts in bash. See http://mywiki.wooledge.org/BashFAQ/035 Guest19 1687705775 forget Guest19 1687705815 learn while getopts ab: opt; do case $opt in a) a=1;; b) b=$OPTARG;; *) exit 1; esac # If unexpected option will be passed in arguments, getopts will print its own error message. Read what is printed by help getopts in bash. See http://mywiki.wooledge.org/BashFAQ/035 larryv 1687706452 forget larryv 1687706459 learn while getopts ab: name; do case $name in a) a=1;; b) b=$OPTARG;; *) exit 1;; esac; done; shift $((OPTIND - 1)) # For error handling and other details, see https://mywiki.wooledge.org/BashFAQ/035 or run ''help getopts''