How to do it...

  1. We are going to write a shell script to ascertain the time in different time zones. To do this, we are going to use the date command. Create a timezones.sh shell script and write the following code in it:
TZ=":Antarctica/Casey" dateTZ=":Atlantic/Bermuda" dateTZ=":Asia/Calcutta" dateTZ=":Europe/Amsterdam" date

Get Bash Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.