procmail
[Top] [All Lists]

Re: Search last line of mail

2002-08-06 13:24:42
Maybe:

:0 b
* sometext$^^
someaction

Or maybe, even better:

lastline = `tail -2`

:0
* lastline ? somesearchstring
someaction



On Tue, 6 Aug 2002, S Semple wrote:

I want to search the last line of the mail.

can use  " sed -n '$p' " to look at the last line, but i dont know how to put 
it into a recipe. Can anyone show me a sample. I want to look at the last 
line or even the last 2 lines for a particular string.

I cant seem to figure out how to put this into a recipe.

Any help would be apreciated.

Thank you.



__________________________________________________________
Win a First Class Trip to Hawaii to Vacation Elvis Style!
http://r.lycos.com/r/sagel_mail/http://www.elvis.lycos.com/sweepstakes
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail


-- 
"I'm proud to be paying taxes in the United States.  The only thing is--I
could be just as proud for half the money." - Arthur Godfrey

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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