diff options
author | David Wührer <def@gmx.at> | 2024-05-18 21:04:34 +0200 |
---|---|---|
committer | David Wührer <def@gmx.at> | 2024-05-18 21:04:34 +0200 |
commit | 77cfffee6177fb0421fa0fce15d6a1875bde4816 (patch) | |
tree | 251428cdd482ea50cfb019dbd3c3bafd79d2fd14 /countdown2 | |
parent | 75b23ce1ff0daab363725a2a5755ea80bbeaa68e (diff) |
manuals, sum-down, radix
Diffstat (limited to 'countdown2')
-rwxr-xr-x | countdown2 | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/countdown2 b/countdown2 deleted file mode 100755 index 615f6eb..0000000 --- a/countdown2 +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -if [ -z "$1" ]; then echo "usage $0 date"; exit 1; fi - -declare -ir t=`date +%s -d "$1"`; - -declare -i d=t-`date +%s`; -while [ $d -gt 0 ]; do - #yyyy-mm-ddThh:mm:ss - #ww-dd hh:mm:ss - if [ $d -gt 5400 ]; then - h=$((d/3600)) - m=$(((d-(h*3600))/60)) - if [ $m -lt 10 ]; then m=0$m; fi - s=$((d%60)) - if [ $s -lt 10 ]; then s=0$s; fi - echo -en "\r$h:$m:$s " - elif [ $d -gt 90 ]; then - m=$((d/60)) - s=$((d%60)) - if [ $s -lt 10 ]; then s=0$s; fi - echo -en "\r$m:$s " - else - echo -en "\r$d " - fi - #echo -en "\r$d\t"; - sleep 1; - d=t-`date +%s`; -done -echo -en "\r" |