diff options
author | astrid silico | 2023-06-22 16:22:16 +0100 |
---|---|---|
committer | astrid silico | 2023-06-22 16:22:16 +0100 |
commit | a84c5203c2533e7ac49bc97c26da6da0b2f808f5 (patch) | |
tree | 32a3c60ac442c0985d3d67491afb0f070fccd1bc | |
parent | 177e4734a82d8f9eb38cb0f49a4c538cac0da953 (diff) |
add a "loop" option and change the default behavior to run once.
-rwxr-xr-x | worldclock | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/worldclock b/worldclock index 57c6926..e2d806f 100755 --- a/worldclock +++ b/worldclock @@ -1,6 +1,8 @@ #!/bin/bash -ZONES="America/Los_Angeles UTC Europe/London Europe/Berlin Asia/Kuala_Lumpur Asia/Singapore unix" +ZONES="America/Los_Angeles America/New_York UTC Europe/London Europe/Paris Pacific/Auckland Singapore unix" + +HOMEZONE=America/Los_Angeles while : do @@ -14,5 +16,12 @@ do fi echo -e $TIME "\t" $TZ done + echo + echo + #TZ=$HOMEZONE date +%T | sed -e 's/:/ . /g' | figlet -f banner + if [ x"$1" = x"loop" ] + then sleep 1 ; continue + else break + fi sleep 1 done |