Cal
The cal command produces a simple calendar as the output. The output is the calendar for current month by default.
Syntax
cal [ [month] year]
where month specifies the month to be shown, represented as a decimal integer from 1 (January) to 12 (December) and the default is the current month. Year specifies the year for that the calendar is to be shown that represented as a decimal integer from 1 to 9999 digits. The default is the current year.
Practice 1
Giving example shows the usage of the cal command.
# cal
May 1999
S M Tu W Th F S
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
In the above example the calendar for the current month is shown as no options have been specified.
Note: A year must be entered as a four-digit number. A Calendar for the year 99 A.D, and not the year of 1999. It is considered as the year and not the month if only one argument is provided to the cal command. For instance: cal 07 will show the calendar for the year 08 A.D. and not the month July.