#!/usr/bin/env sh6 : : sh6 - " Force sh(1), csh(1), and other shells to exit w/ error! " <'' ;;; : : " @(#)$Id: zdate.sh6 410 2008-05-15 05:01:41Z jneitzel $ " : : " The author of this file, J.A. Neitzel , " : " hereby grants it to the public domain. " : : : " Print the date and time for each time zone in the following list: " : : " o Australia/Brisbane, Australia/Sydney, Australia/Adelaide, " : " Australia/Darwin, Australia/Perth, UTC, Canada/Newfoundland, " : " Canada/Atlantic, EST5EDT, CST6CDT, MST7MDT, PST8PDT, " : " Pacific/Honolulu " : : " usage: zdate " : sh6 - Australia/Brisbane Australia/Sydney \ Australia/Adelaide Australia/Darwin Australia/Perth UTC \ Canada/Newfoundland Canada/Atlantic EST5EDT CST6CDT MST7MDT PST8PDT \ Pacific/Honolulu : TZ env TZ=$1 date '+%a, %Y-%m-%d, %R %Z' | tr -d '\n' if $1 = Australia/Brisbane echo -n ' (Brisbane)' if $1 = Australia/Sydney echo -n ' (Sydney)' if $1 = Australia/Adelaide echo -n ' (Adelaide)' if $1 = Australia/Darwin echo -n ' (Darwin)' if $1 = Australia/Perth echo -n ' (Perth)' if $1 = Canada/Newfoundland echo -n " (St. John's)" if $1 = Canada/Atlantic echo -n ' (Halifax)' if $1 = EST5EDT echo -n ' (New York / Montreal / Toronto)' if $1 = CST6CDT echo -n ' (Chicago / Winnipeg)' if $1 = MST7MDT echo -n ' (Denver / Edmonton)' if $1 = PST8PDT echo -n ' (Seattle / Vancouver)' if $1 = Pacific/Honolulu echo -n ' (Honolulu)' echo shift ; : " Shift the arguments to the left by one. " if X$1 = X exit ; : " Exit if no time-zone arguments remain. " goto TZ ; : " Otherwise, continue w/ the next loop. "