home *** CD-ROM | disk | FTP | other *** search
- From: news@m2xenix.psg.com (Randy Bush)
- Newsgroups: alt.sources
- Subject: Re: Smail3 log file parser
- Message-ID: <1990Dec27.001457.9499@m2xenix.psg.com>
- Date: 27 Dec 90 00:14:57 GMT
-
- [ in alt.sources because it contains a shell script to accomplish the same task
- as a previous posting ]
-
- jeff@onion.pdx.com (Jeff Beadles) writes:
-
- > What this program will do is simple. It will take the smail3 logfile
- > information, and produce a fairly human-readable report.
-
- Your C code went infinite over here on Xenix/386 (after hacking rindex). But
- m2xenix's smail log has about 1k messages per day, and the matching entries can
- be quite separated (I've see a hundred lines) as smail runs -q5m.
-
- I have been using the following sort/awk hack to accomplish the same. But it
- goes a bit grotty with mailing lists and mail gated to a newsgroup via inews.
-
- - - - - - - - - - - - - - - c u t h e r e - - - - - - - - - - - - - -
-
- sort +2 -3 < /spool/smail/log/logfile | awk '
- { if ($4 == "new") printf ("%s %s => ", $2, $7)
- else if ($6 == "delivered") print ($4) }' | sort
-
- - - - - - - - - - - - - - - c u t h e r e - - - - - - - - - - - - - -
-
- So, what a fellow smailer at a more anal site wants now is a bytecount per
- sender and recipient.
-
- And now we should be hearing from the perl hackers. Or will the INTERCAL
- --
- ..!{uunet,qiclab,intelhf,bucket}!m2xenix!news
-