SKIPBLANKS= TMPDIR=/tmp CASE=lower while getopts :bt:u arg do case $arg in b) SKIPBLANKS=TRUE ;; t) if [ -d "$OPTARG" ] then TMPDIR=$OPTARG else print "$0: $OPTARG is not a directory." >&2 exit 1 fi ;; u) CASE=upper ;; :) print "$0: Must supply an argument to -$OPTARG." >&2 exit 1 ;; \?) print "Invalid option -$OPTARG ignored." >&2 ;; esac done shift $((OPTIND-1))