Saturday, July 19, 2008

Command line utility to print a Calendar

$ cal

will print out a calendar for the current month on the screen.

$ cal 2008

will do the same for the year 2008.

$ cal 03 2008

will do the same for the month of March, 2008. If, however, we want to print the calendar as a .ps file, we can use the pcal utility.

$ pcal -w 2008 -s 0:0:0 -P a4 > 2008.ps

We can convert this .ps file to .pdf using

$ ps2pdf 2008.ps 2008.pdf

No comments: