##############################################################################
# parse optional arguments
#
-while getopts "v" opt
+while getopts "vt" opt
do
case "$opt" in
v)
verbose=YES
+ timestamps=YES
+ ;;
+ t)
+ timestamps=YES
;;
esac
done
function print_time()
{
- [ "$verbose" == "YES" ] && echo "$(date +%T.%N) ~ "
+ [ "$timestamps" == "YES" ] && echo "$(date +%T.%N) ~ "
}
##############################################################################