From a84c5203c2533e7ac49bc97c26da6da0b2f808f5 Mon Sep 17 00:00:00 2001 From: astrid silico Date: Thu, 22 Jun 2023 16:22:16 +0100 Subject: add a "loop" option and change the default behavior to run once. --- worldclock | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 -- cgit 1.4.1-2-gfad0