scott@csusac.csus.edu (L. Scott Emmons) (01/07/90)
I've noticed some recent postings regarding 'from' type programs for mail. For those of us without perl (yet!), the following csh alias will list who mail is from, with a date and a subject (an improvement over /usr/ucb/from). If someone has already posted something like this then Sorry! Note a couple of things: - This assumes mail headers are like they are at our site -- if it doesn't work for you change it or don't use it...don't tell me there's a bug, cuz there ain't... - The environment variable MAIL should read '/usr/spool/mail/YOURLOGINHERE' --- alias from "^From |^Subject:" $MAIL -- L. Scott Emmons --------------- ...[!ucbvax]!ucdavis!csusac!scott ucdavis!csusac!scott@ucbvax.berkeley.edu
dalgic@Neon.Stanford.EDU (Ismail Dalgic) (01/07/90)
Since people started sending millions of different versions of "from", let me send my own version that I have been using for some time. This one uses "mail" to do most of the job. It prints the sender, the number of lines/characters in the message, and the subject, all in one line. You can simply add $4,$5,$6 and $7 in the print list of awk to print the date as well. Here it is: alias from 'echo "q" | mail | awk \' {if (NF == 9) print $3,$8,$9}\'' BTW, is alt.sources really the appropriate place to send such one-liners? Have Fun, --Ismail