while getopts a:b OPTIONS 2> /dev/null
do
case $(OPTIONS) in
a)
VAR1=${OPTARG}
;;
b)
VAR2=1
;;
*)
echo "Invalid"
usage
exit 1
;;
esac
done
logcmd ()
{
echo "" >> ${LOGFILE}
echo "Running: $@" >> ${LOGFILE}
$@ 2>&1 | tee -a ${LOGFILE}
return ${PIPESTATUS}
}
logcmd ()
{
echo "" >> ${LOGFILE}
echo "Running: $@" >> ${LOGFILE}
$@ 2>&1 | tee -a ${LOGFILE}
return ${PIPESTATUS}
}
No comments:
Post a Comment