procmail
[Top] [All Lists]

delete matching line from file

2001-03-11 00:21:36
I am not doing this right.  This code saves off some info about
a received email into a file named mail_log
:0 wci:
   * ^Subject:[        ]+\/.*
   | echo "`date '+%a %b %d %Y'` $ORIG -" $MATCH  >>$HOME/mail_log

Here is sample output:

Sat Mar 10 2001 tomcatt(_at_)aol(_dot_)com - Hawk: Tryouts 
*-tomcatt(_at_)aol(_dot_)com


The subject of the reply is just the same except "Re:" has
been prepended - my code pulls out "Hawk: Tryouts *-tomcatt(_at_)aol(_dot_)com"
 and sed should drop the existing line in mail_log.

# remove the original data from data file
:0fwi
 * ^Subject: Re:[  ]+\/.*
      STRINGTOCHECK = $MATCH 
     | sed -e '/$STRINGTOCHECK/d' $HOME/mail_log

Can anyone spot an obvious error?  Using the debug file generated by
procmail doesn't indicate to me what's wrong.

Thanks  Tom
_______________________________________________
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>