#! /bin/sh 

# sh -- template for shell scripts
#
# $Id: sh,v 1.2 1999/02/20 23:49:58 cdua Exp cdua $
# Carlos Duarte, 980420/990218

#trap -- 'rm -f /tmp/xpto' EXIT SIGINT

USAGE='
	eval cat<<EOF
usage: $0 [-h] [-n] options args ... 

  -h      this help
  -n      no op
EOF
	exit 1
'

while : ; do
	case x"$1" in 
	x-h)	eval "$USAGE" ;;
	x-n)	: ;;
	x--)	shift; break ;;
	x-*)	echo "invalid option -- `echo $1|cut -c2-`"
		eval "$USAGE" ;;
	*)	break ;;
	esac
	shift
done

## if _must_ accept one extra argument after options
#test $# -eq 0 && eval "$USAGE" 

## do rest of stuff with $*, if any 
