Calendar

Bill Vaughn bill at uhura.cc.rochester.edu
Tue Jul 10 15:46:54 AEST 1990


In article <9691 at brazos.Rice.edu> moj at mirfak.UTU.FI (Matti Jokinen) writes:
>
>At least in SunOS 4.0.3 there is a bug in /usr/bin/calendar: the messages
>are sent twice if the userid is both in /etc/passwd and in the YP map.
>Fortunately /usr/bin/calendar is a script and can be fixed easily:
>
>27c27
>>       $caldata |cat /etc/passwd - | grep -v '^[+-]' |\
>---
><       $caldata |cat /etc/passwd - | grep -v '^[+-]' | sort -u |\

While looking at /usr/bin/calendar in order to checkout the above fix I
noticed a curious line:

		if (/usr/lib/calendar $y/calendar)

Now /usr/lib/calendar is supposed to create a 'sed' script used to find
specific dates in one's calendar file.  I'm not sure that it's exit status
is well defined and I'm not sure what it will do with the argument.
Shouldn't the line be:

		if test -f $y/calendar			?

Is /usr/lib/calendar doing something that's not documented here such as
testing the existence of it's argument?  Just curious.

Bill Vaughn
bill at cvs.rochester.edu



More information about the Comp.sys.sun mailing list