#! /bin/sh # # $Id: template-shell 7524 2006-02-07 23:18:55Z wohler $ # # NAME # name - one line description # # SYNOPSIS # name [optional args in square brackets] # # DESCRIPTION # # OPTIONS # --debug # Turn on debugging messages. # # --help # Display the usage of this command. # # --version # Display program version. # # RETURN VALUE # # EXAMPLES # # ENVIRONMENT # # FILES # # SEE ALSO # # VERSION # $Revision: 7524 $ # # AUTHOR # Bill Wohler <wohler@newt.com> # # Copyright (C) 2000 Newt Software # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, you can find it at # http://www.gnu.org/copyleft/gpl.html or write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Initializations. # Constants. cmd=`basename $0` # name by which command called # Program version: start with CVS version, strip dollar signs, CVS keyword # and whitespace. ver=`echo '$Revision: 7524 $' | sed -e 's/\\$//g' -e 's/Revision://' -e 's/ //g'` # Variables (may be overridden by arguments). debug=0 # verbose mode exitstatus=0 # upon error, set to non-zero and exit interrupt=0 # upon interrupt, set to 1 # Functions. # Display usage information and exit. usage() { cat < $cmd comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. See http://www.gnu.org/copyleft/gpl.html for details. EOF exit 0; } # Parse command line. while [ $# != 0 ]; do case "$1" in --d*) debug=1;; --h*) usage;; --v*) show_version;; -*) usage;; *) break;; esac shift done trap intr 2 # ADD CODE HERE bye