basic help doc
This commit is contained in:
@@ -1,5 +1,18 @@
|
|||||||
#!/bin/bash
|
#!/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 {
|
function displaytime {
|
||||||
local T=$1
|
local T=$1
|
||||||
local D=$((T/60/60/24))
|
local D=$((T/60/60/24))
|
||||||
|
|||||||
Reference in New Issue
Block a user