Name
cal — stdin stdout - file -- opt --help --version
Synopsis
cal [options
] [month
[year
]]
The cal
command prints a
calendar—by default, the current month:
➜ cal
December 2011
Su Mo Tu We Th Fr Sa
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
To print a different calendar, supply a month and four-digit year:
➜ cal 8 2012
If you omit the month (cal
2012
), the entire year is printed. You must provide the full
year number with four digits: cal 12
will print a
calendar for the year 12 A.D.
Useful options
| Print the current year’s calendar. |
| Number each day by its position in the year; in our example, September 1 would be displayed as 244, September 2 as 245, and so on. |
Get Macintosh Terminal Pocket Guide 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.