#!/bin/sh # template.sh: A template for sh scripts # # Usage: template.sh [-ac] [-b OPTARG] FILE... usageMessage="Usage: template.sh [-ac] [-b OPTARG] FILE..." # Process options while getopts ':ab:c' opt; do case $opt in 'a' ) echo a ;; 'b' ) echo b $OPTARG ;; 'c' ) echo c ;; '?' ) printf "${usageMessage}\n" exit 1 esac done shift $(($OPTIND - 1)) <++>