#!/bin/bash function usage () { echo "Usage:" echo " myprog.sh [--test|--help|--version]" } case $1 in --test|-t) echo "you used the --test option" exit 0 ;; --help|-h) usage ;; --version|-v) echo "myprog.sh version 0.0.2" exit 0 ;; -*) echo "Error: no such option $1" usage exit 1 ;; esac echo "You typed \"$1\" on the command-line"
function usage () { command1 command2; command3 ...... }
usage () { command1 command2; command3 ...... }