Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- if [ -z "$1" ]
- then
- args="US/Eastern US/Pacific"
- else
- args=$@
- fi
- for i in $args
- do
- if [ -f "/usr/share/zoneinfo/$i" ]
- then
- echo ${i}: $(TZ="$i" date)
- else
- echo Error: Timezone $i not exist.
- exit 1
- fi
- done
- exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement