procmail
[Top] [All Lists]

Re: grabbing the third line of the body

1996-12-17 12:08:52
Timothy Luoma asked,

| I get a certain mail message every day with the same subject from  
| the same person.  The subject itself it _not_ very helpful.  What I  
| would like is if I could get the third line of his email message,  
| dump his useless subject, and replace the subject with the third  
| line from the body.

   :0hf
   * other conditions for identifying mail from this fellow
   * B ?? ^^.*$.*$\/.+
   | formail -I "Subject: $MATCH"

Note that it also takes care of skipping cases, as Philip Guenther explained,
where the third line of the body is empty.  It also saves the call to sed.

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