9 lines
314 B
Bash
9 lines
314 B
Bash
local times= n=$COLUMNS tz
|
|
for tz in ZRH:Europe/Zurich PIT:US/Eastern \
|
|
MTV:US/Pacific TOK:Asia/Tokyo; do
|
|
[ $n -gt 40 ] || break
|
|
times="$times ${tz%%:*}\e[30;1m:\e[0;36;1m"
|
|
times="$times$(TZ=${tz#*:} date +%H:%M)\e[0m"
|
|
n=$(( $n - 10 ))
|
|
done
|
|
[ -z "$times" ] || printf "%${n}s$times\\r" ''
|