procmail
[Top] [All Lists]

Counting messages

1997-09-06 20:56:21

I have a couple of lists that I maintain.  The lists are archived (gzip).

I'd like to get some stats on these archived lists -- I'd like to see, for
example, a summary by sender (From:) for each poster that shows how many
messages and total characters (or words) they have posted.  And I'd like to
do this month-by-month, but that's not critical.

My guess is someone already is doing something similar, and if you could
share a recipe it would be a big help, obviously.  My procmail and UNIX
skills are REALLY rusty.

I don't have much so far, just enough to extract the individual email
address and dates:

# Grab date (need to extract month)
:0
* ^Date:\/.*
{
   DATE=$MATCH
}

# Extract email address
:0
* ^From:.*[      <]\/[^         <]*(_at_)[^   >]*
{
   FROM=$MATCH
}
 
 
:0bi:out.lock
| echo $FROM    $DATE >>! out



What I can't remember how to do is to, say count words using wc within
procmail and assign it to a variable.

There must be an easier way than:
 
:0biWc
| wc -w >! tmp
 
WORDS=`cat tmp`

But that wouldn't work.

Also, any simple way to tally these things up per $FROM?
 

Thanks,

Bill Moseley
mailto:moseley(_at_)netcom(_dot_)com

<Prev in Thread] Current Thread [Next in Thread>