Created
April 5, 2012 20:37
Revisions
-
Goles revised this gist
Apr 5, 2012 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,6 +2,11 @@ # Command-line world clock # Taken from http://stackoverflow.com/questions/370075/command-line-world-clock # .worldclock.zones file looks like: # US/Pacific # Europe/Berlin # Chile/Continental : ${WORLDCLOCK_ZONES:=$HOME/.worldclock.zones} : ${WORLDCLOCK_FORMAT:='+%Y-%m-%d %H:%M:%S %Z'} -
Goles created this gist
Apr 5, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ #!/bin/sh # Command-line world clock # Taken from http://stackoverflow.com/questions/370075/command-line-world-clock : ${WORLDCLOCK_ZONES:=$HOME/.worldclock.zones} : ${WORLDCLOCK_FORMAT:='+%Y-%m-%d %H:%M:%S %Z'} while true do clear while read zone do echo $zone '!' $(TZ=$zone date "$WORLDCLOCK_FORMAT") done < $WORLDCLOCK_ZONES | awk -F '!' '{ printf "%-20s %s\n", $1, $2;}' sleep 1 done