Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84 SMI; site sun.uucp Path: utzoo!linus!philabs!prls!amdimage!amdcad!decwrl!sun!guy From: guy@sun.uucp (Guy Harris) Newsgroups: net.unix-wizards Subject: Re: Re: mailwatch script wanted Message-ID: <2509@sun.uucp> Date: Sun, 28-Jul-85 00:45:13 EDT Article-I.D.: sun.2509 Posted: Sun Jul 28 00:45:13 1985 Date-Received: Tue, 30-Jul-85 04:51:35 EDT References: <411@sdcc12.UUCP> <319@tektools.UUCP> <160@kitty.UUCP> Organization: Sun Microsystems, Inc. Lines: 13 > Here is an alternative to the above which does not require knowing the mail > spool path and file names: > > if (mail -e) echo 'You have mail.' This only works if you have the S3/S5 version of "mail". (Besides, they should have added a flag which tells "mail" to *print* a message instead of returning an exit status, or to return one of *three* exit statuses. That way, you can distinguish "You have mail (because you leave stuff around in your mailbox until you've responded to it)" from "You have mail (because some mail arrived since the last time you looked at your mailbox).") > Guy Harris