Commit 73042d5f by Fred Smith

template for scripts to include getopts code

parent 9011a0cf
#! /bin/bash
DEBUG="false"
function usage {
echo "$0 - $VERSION (2012 - fred.smith@fredsmith.org)";
echo "description of the program";
echo "Usage: $0 [options]";
echo "options:";
echo " -d Debug mode";
echo " -h Usage (this screen)";
}
while getopts "dh" optionName; do
case "$optionName" in
d)
DEBUG="true"
;;
h)
usage;
exit;
;;
[?])
usage;
exit;
;;
esac
done
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment