Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site umcp-cs.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!umcp-cs!chris From: chris@umcp-cs.UUCP (Chris Torek) Newsgroups: net.unix-wizards Subject: Re: Re: mailwatch script wanted Message-ID: <1048@umcp-cs.UUCP> Date: Tue, 30-Jul-85 18:43:15 EDT Article-I.D.: umcp-cs.1048 Posted: Tue Jul 30 18:43:15 1985 Date-Received: Thu, 1-Aug-85 20:02:39 EDT References: <411@sdcc12.UUCP> <319@tektools.UUCP> <160@kitty.UUCP> <2509@sun.uucp> Organization: U of Maryland, Computer Science Dept., College Park, MD Lines: 21 I might note that our systems (and 4.3BSD) print You have mail. or You have new mail. when you log in, if you have mail or new mail. We put this in login.c long ago. The code is basically something like this: struct stat st; ... sprintf(buf, "%s/%s", MAILDIR, pwd->pw_name); if (stat(buf, &st) == 0) printf("You have %smail.\n", st.st_mtime > st.st_atime ? "new " : ""); -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 4251) UUCP: seismo!umcp-cs!chris CSNet: chris@umcp-cs ARPA: chris@maryland