welp.. to make the error exits and such cleaner, i added "-e "\n" to them:
function error_exit
{
#####
# Function for exit due to fatal program error
# Accepts 1 argument
# string containing descriptive error message
#####
echo -e "\n${PROGNAME}: ${1:-"Unknown Error"}" >&2
exit 1
}
function term_exit
{
#####
# Function to perform exit if termination signal is trapped
# No arguments
#####
echo -e "\n${PROGNAME}: Terminated"
exit
}
function int_exit
{
#####
# Function to perform exit if interrupt signal is trapped
# No arguments
#####
echo -e "\n${PROGNAME}: Aborted by user"
exit
}
and... for the program guts... after the if..--help statement...
if [ "$1" = "" ]; then
helptext
graceful_exit
fi
... just because the * in the getopts while statement was giving me
problems...
just another $0.02 from me :)
ø(ju...@ge...)--------ooOo---oOoo-----------------------------ø
| Systems Administrator . technolust.cx irc.spamnet.org 6667 |
| http://www.technolust.cx/~jura http://www.spamnet.org |
| |
| Geek Pit Labs http://www.geekpitlabs.com AIM: geekpitlabs |
| Geek Admins dot org http://www.geekadmins.org |
°----------------------------------------------------------------------°
For-pay Internet distributed processing.
http://www.ProcessTree.com/?sponsor=31381
|