Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 (Tek) 9/28/84 based on 9/17/84; site tektools.UUCP Path: utzoo!linus!decvax!tektronix!daemon!tektools!jerryp From: jerryp@tektools.UUCP (Jerry Peek) Newsgroups: net.unix-wizards Subject: Re: mailwatch script wanted Message-ID: <319@tektools.UUCP> Date: Fri, 19-Jul-85 11:09:58 EDT Article-I.D.: tektools.319 Posted: Fri Jul 19 11:09:58 1985 Date-Received: Sun, 21-Jul-85 03:13:42 EDT References: <411@sdcc12.UUCP> Reply-To: jerryp@tektools.UUCP (Jerry Peek) Organization: Tektronix, Beaverton OR Lines: 20 Summary: [Doesn't this sort of thing belong in net.unix?] In article <411@sdcc12.UUCP> wa371@sdcc12.UUCP (Bernd) writes: > Does anyone have a suggestion for a shell script for my .login > file, which will announce immediately upon login whether I have mail > or not, without putting me into the mail program if I don't want > to be. > It should run under the 4.2 c-shell. Try this single line: if (! -z /usr/spool/mail/wa371) echo You have mail. Instead of hardcoding your login name (wa371), you could use $user instead. --Jerry Peek, UNIX Training Instructor, Tektronix, Inc. US Mail: MS 74-222, P.O. Box 500, Beaverton, OR 97077 uucp: {allegra,decvax,hplabs,ihnp4,ucbvax}!tektronix!tektools!jerryp CS,ARPAnet: jerryp%tektools@tektronix.csnet Phone: 503/627-1603