Print off a calender for the year

Feb 09, '05 08:45:00AM

Contributed by: t3hl33t

To print off a yearly calendar, open the Terminal and type:

cal -y|open -f
This will display a full-year's calendar in TextEdit. Print the TextEdit document, and you're done.

This works in this manner: cal -y generates a yearly calendar and then its output (the calendar) is passed via the pipe (the | symbol) to open -f, which reads from standard input and makes a new TextEdit document.

Here's a bit of sample output:
                              2005                              

      January               February               March        
 S  M Tu  W Th  F  S   S  M Tu  W Th  F  S   S  M Tu  W Th  F  S
                   1         1  2  3  4  5         1  2  3  4  5
 2  3  4  5  6  7  8   6  7  8  9 10 11 12   6  7  8  9 10 11 12
 etc. etc. etc.
[robg adds: Yes, this is a simple Unix hint. But not everyone's a wizard (myself definitely included!), and some may find this useful as a demonstration of sending terminal output to TextEdit. You might also want to add the j flag to the cal command, which will number the dates of the year sequentially. If you prefer the GUI of iCal, this hint offers some calendar printing tips...]

Comments (5)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20050205000819433