On Tue 29-Jul-03 7:56pm -0400, Bill McCarthy wrote:

> What's wrong with ACCOUNT.LOG?  There's enough info there to grab the
> filters passed and the location moved for each message.  For my setup,
> I generally figure about a half K per message - so a 200k log limit
> (account-]properties-]options) will keep, approximately, the last 400
> message stats - YMMV :-)

Although I usually use my own custom stats file, I wrote a little
script (tested in both 4nt and cmd).

This script is all on one line.  It assumes you have the 'nix
utilities sed, tail and uniq.

------------------------------------------------------------
    sed "/^[^>]/d" c:\data\thebat\mail\bill\account.log|
    sed "s/.*\"\(.*\)\")/\1/"|
    tail -200|
    sort|
    uniq -c|
    sort /r
------------------------------------------------------------

You would place this in a .CMD file or as an alias.

Here's what it does:

    The first sed deletes (not in the actual file) lines not
    starting with '>'.

    The second sed replaces each line with the name of the
    folder to which the email was moved.

    The tail command picks the last 200 emails received
    (remove this if you like).

    The sort, sorts the folders for uniq.

    Uniq -c counts the mails going to each folder.

    The last sort is a reverse sort of folder usage.

For the last 100 emails received to TB lists, my output looks like
this:

     41 Lists\The Bat!
     37 Lists\The Bat!\TBot
     21 Lists\The Bat!\TBbeta
      1 Lists\The Bat!\TBTech

-- 
Best regards,
Bill


________________________________________________
Current version is 1.62r | "Using TBUDL" information:
http://www.silverstones.com/thebat/TBUDLInfo.html

Reply via email to