blob: 03e3f86939107f6e7bd7c5bd701e347a6fa3f64d [file] [log] [blame]
#!/bin/bash
# Template to start a simple bash program. This is designed only for the
# simplest of programs where all program parameters are positional, there is no
# help text, etc.
# Description of argument(s):
# parm1 Bla, bla, bla (e.g. "example data").
function get_parms {
# Get program parms.
parm1="${1}" ; shift
return 0
}
function validate_parms {
# Validate program parameters.
# Your validation code here.
if [ -z "${parm1}" ] ; then
echo "**ERROR** You must provide..." >&2
return 1
fi
return 0
}
function mainf {
get_parms "$@" || return 1
validate_parms || return 1
# Your code here...
return 0
}
# Main
mainf "${@}"
rc="${?}"
exit "${rc}"