cal—displays a calendar

cal [ [ month ] year ]

cal prints a calendar for the specified year. If a month is also specified, a calendar just for that month is printed. If neither is specified, a calendar for the present month is printed.

Example A.6.
1   cal 1997
2   cal 5 1978

EXPLANATION

  1. Prints the calendar year 1997.

  2. Prints the month of May for 1978.

Get UNIX® Shells by Example, Third Edition 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.