
The ECN No Name Newsletter is no longer being published. This is an archived issue.
[previous article] [next article]Stacey Clark
The command pcal is available to generate PostScript calendars on
Gould, Vax and Sun 4 machines. (But not Sun 3s!) The calenar
generated includes a small full month calendar of the previous
and next month in the bottom corner. If you type
"help pcal"
you will see that there are many different options; but, the
basic syntax is:
pcal [ month ] [ year ] [ nmonths ]
Pcal generates PostScript to produce landscape or portrait calendars for any month and year. The arguments month , year, and nmonths, if provided, should be numeric. The month should be in the range 1 - 12, and year should be specified as the full 4 digit year. If you specify nmonths as 2, for example, you will get 2 pages - the month you specify and the following month. If you type:
pcal 8 93 | lpr -Pki3
you will get a calendar for August, 0093, on the ki3 laser. This is probably not what you want! I could print out a calendar for the month and year that my daughter was born with the command:
pcal 7 1983 | lpr -Pci2
to print on the ci2 laser. Or I could print out a much more useful item, this month's calendar:
pcal | lpr -Pka9
If no arguments are given after the pcal command, the current month and year will be generated as postscript.
If one number is provided, it is interpreted as the year, generating the whole year. If you typed:
pcal 3
the computer would produce all 12 months for the year 3 A.D. not March.
If you have a file called .calendar or calendar in your home directory, it will be searched for lines with dates matching the requested month. Any items with the indicated month will be printed on the calendar under that day of the month. Dates may consist of a numeric (January = 1) or textual month (at least the first 3 characters for month names, so jan=Jan=January=january) followed by a numeric day. For example your calendar file might contain:
Apr 2 - Softball at field B16 6:00 PM April 22 - Senior design due Apr 29 - RAZZ banquet April 24 - Grand Prix May 8 - Spring Semester Ends
Items that are in your calendar file will be mailed to you as a reminder, the day before, and the day of the date listed. If an item occurs on a Monday, you will get reminder mail messages starting on Friday.
Pcal has many options. The ones I use most often are:
-e Print an empty calendar. Do not print
entries from a calendar file.
-f cal Directs pcal to use the file name cal as the
input file in place of the default calendar
file in the caller's home directory.
-M This will cause moon icons to be printed
on all dates (default: no moons).
If the environment variable PCAL_OPTS is defined, its contents are used as a command line option. For example, if you use csh, you could type the following:
setenv PCAL_OPTS '-M'
to set the "moon icon" option to be always printed when you use pcal.
Please remember that pcal is unsupported by the ECN staff.
However questions and comments can be directed to Dave Halesma,
(halsema@ecn.purdue.edu), who is the voluntary maintainer of
pcal.