[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Grep only mail headers via STDIN?



On Friday 05 March 2004 10:37, Jens Benecke shoved this in my mailbox:
> I want to create a script that greps for a specific mail header coming from
> STDIN. "mailgrep" and "mboxgrep" don't work, they need files to work on,
> but the mail comes via STDIN.

I'm not saying this can't be done from a shell script, but it seems like a 
typical job for Perl to me. If you are a bit familiar with it, it has some 
CPAN modules that make it very easy to do all sorts of message filtering.

This may be overkill for you if it means you have to pick up Perl for just 
this, but you may find it to be usefull so...

joost


DISCLAIMER
This e-mail and any attached files are confidential and may be legally privileged. If you are not the addressee, any disclosure, reproduction, copying, distribution, or other dissemination or use of this communication is strictly prohibited. If you have received this transmission in error please notify A.S.T.R.I.D.  nv/sa immediately and then delete this e-mail.



Reply to: