Rob, et al --
...and then Rob 'Feztaa' Park said...
% On Sat, Nov 10, 2001 at 01:56:28PM +0530, Prahlad Vaidyanathan (dis)graced my inbox
with:
% > > the 161 Web clients is one person (my best friend, he uses a webmail thing).
And he's still a friend? I thought you had better taste ;-)
% >
% > That's not the only flaw - currently it looks through all
% > the files in ~/Email, including =sent-mail, and =mutt-users,
% > which will naturally be _extremely_ biased.
%
% Well, there's no need to go through sent-mail, because that's just me,
% and I know what I use. I would still like it to go through mutt-users,
Of course, if one were to do that and implement the non-duplication, then
you would properly count yourself as a mutt user instead of having to
abstain!
% because those are still valid emails that were sent to me. Other lists
% can be biased too, and we don't want to have to discriminate against all
% subject-specific mailing lists ;)
Right :-)
%
% > So, one could just do something like so:
% > FILES=$(find $HOME/Email -type f -maxdepth 1 ! -name
% > sent-mail ! -name mutt-users )
% >
% > then, make it grep only through $FILES, and not '*'.
%
% Yep.
Sounds good enough. Better yet, you probably only have a limited number
of incoming folders, and you were probably clever enough to set them up
with a matching initial regexp (for me it's =F.*), so it would also be
pretty easy to limit the file listing that way.
If you insist on looking into every file in the directory except for an
exception or two, I should think that
FILES=`ls -1 $HOME/Email | egrep -v 'sent-mail|mutt-users'`
would be quicker than a find, even if you also told ls to list in long
format and excluded directories and then used awk to print only the last
field of each line... Then, of course, there's the sed method, too,
which might be even faster than awk.
%
% > But, as far as the problem you mentioned goes - checking for
% > the Sender/X-Sender fields (possibly piping it through sort
% > and uniq to remove duplicates), and then grepping through it
% > would be, to say the least, tedious (at least in bash).
%
% Yeah, I wouldn't know where to start with a bash script, especially with
% mbox style folders (I could grep through to find how many unique people
% emailed me easily enough, but how would I link each person to a mua?)
I should think that, here, awk would be your friend; start looking every
time you see a ^From_ and build an array of addresses you've seen and
signatures you've seen and their counts, only incrementing if the address
is new. Yeah, perl (or probably even python :-) would be nicer, but
don't give up on bash; do it for the exercise!
%
% > It would probably make more sense in perl or something, but
% > I don't know perl, so I'll leave it to someone else :-)
%
% Well, I just bought a book on perl, perhaps I could learn how to do this
% ;)
He's coming around! Woo hoo!
%
% Not right away though, I've got a busy weekend ahead of me.
Oh, phooey.
%
% --
% Rob 'Feztaa' Park
% [EMAIL PROTECTED]
% --
% C:\WINDOWS C:\WINDOWS\GO C:\PC\CRAWL
I *love* this one! Replace the spaces with semicolons, which still makes
grammatical sense, and you have a real PATH value under DOS :-)
:-D
--
David T-G * It's easier to fight for one's principles
(play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie
(work) [EMAIL PROTECTED]
http://www.justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
PGP signature