procmail
[Top] [All Lists]

Which grep match?

2008-08-13 15:55:58
Let's start from this very basic grep recipe...

* ? formail -x Subject: | fgrep -is -f /etc/procmail/subjects.txt

I will know it matched an entry in the file, but I will not know
*which* entry (from subjects.txt) was matched.  Is there an *easy* way
to process this type of query *and* get the match output?  I suppose
in a worst case I could pipe to a script and go through the
subjects.txt file line by line looking for a match, but there must be
an easier way?

My goal is that I desire to start collecting a "hit count" on the
matches, so I see which ones are matched often and which ones are
rarely matched, if ever.

Thanks,
Scott
____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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