procmail
[Top] [All Lists]

multi-line search/store....

1996-12-30 15:50:02
I'm trying to write a recipe that'll search across multiple lines of a
body, grab the found piece, and store it to a file as a single line
with the newlines removed (or replaced)

I can do this for a single line:

----
:0 bfW:parsed.errors
|egrep "^.*string I want"

:0 a:
| formail -I "" >> procmail.parsed
----

What I can't do is extend this to a second line:

Original string:

This is my key string:
        this is the data I want.

So, how can I look for "key string", and stuff both lines into a file
on one line? Unfortunately, changing the format of the incoming mail
isn't possible.


--
           Chuq Von Rospach (chuq(_at_)solutions(_dot_)apple(_dot_)com) 
Software Gnome
       Apple Server Marketing Webmaster <http://www.solutions.apple.com/>

 Plaidworks Consulting (chuqui(_at_)plaidworks(_dot_)com) 
<http://www.plaidworks.com/>
   (<http://www.plaidworks.com/hockey/> +-+ The home for Hockey on the net)

I got no name or number/ I just hand out the lumber.
But if I get a chance to play/ I'm going to show 'em.
                -- Stick Boy (The Hanson Brothers, SUDDEN DEATH)



<Prev in Thread] Current Thread [Next in Thread>
  • multi-line search/store...., Chuq Von Rospach <=