diff --git a/reporting/timer b/reporting/timer index 1d98271..479dcb6 100755 --- a/reporting/timer +++ b/reporting/timer @@ -1,5 +1,18 @@ #!/bin/bash +function helpexit() { + echo "Simple Timer." + echo '$PREFIX is printed before the time' + echo '$POSTFIX is printed after the time' + exit +} + + +for (( i=1; i<=$#; i++ )); do + [[ "${!i}" = "--help" ]] && helpexit + [[ "${!i}" = "-h" ]] && helpexit +done + function displaytime { local T=$1 local D=$((T/60/60/24))