Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!cs.utexas.edu!steveb From: steveb@cs.utexas.edu (Steve Benz) Newsgroups: alt.sources.d Subject: Re: Cmail - check to see who's read their mail - UNIX Message-ID: <932@lego.cs.utexas.edu> Date: 24 Oct 89 17:09:40 GMT References: <1121@kl-cs.UUCP> <2332@convex.UUCP> Organization: U. Texas CS Dept., Austin, Texas Lines: 27 tchrist@convex.COM (Tom Christiansen) writes: [ In response to the people-who-don't-read-mail-checker ] > >Sigh. Yet another piece of system administrative hackery written in C... >it seems like terrific overkill >to do this in C. So as an exercise, I rewrote the program in perl (version >3.0). While I certainly find your program preferable to the original, I question your choice of Perl instead of a shell script. Granted, your Perl program would be faster on some systems, but (at the risk of making a baseless assertion) the Bourne shell is the standard language for writing administrative hackery. >...Two comments on the >original C code: doing getpwent()s until you run out is terribly innefficient >on systems with long passwd files; mine is ~1300 lines long, and it would be >better to do readdir()s on SPOOL and then getpwnam()s on the results. Yes, but don't be so sure that: - There aren't multiple spool directories--a common situation where workstations are involved. - There even is a spool directory at all--The new mail system here (& many other sites, I believe) keeps mailboxes in the home directory of the user. - Steve