O'Reilly logo

Mac OS X Tiger in a Nutshell by Jason McIntosh, Chuck Toporek, Chris Stone, Andy Lester

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

cal

Synopsis

cal [options] [[month] year]

With no arguments, prints a calendar for the current month. Otherwise, prints either a 12-month calendar (beginning with January) for the given year or a one-month calendar of the given month and year. month ranges from 1 to 12; year ranges from 1 to 9999.

Options

-j

Print all days with Julian dates, which number from 1 (for January 1) to the last day of the year.

-y

Print the entire calendar for the current year.

Examples

$ cal -j 12 2003
$ cal 2003 >
                     year_file

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required