procmail
[Top] [All Lists]

Re: Saving $MATCH

1995-12-12 14:20:27
Bill McClatchie asked,

| I have been trying to save the value of $MATCH to a file, and have not been
| having any luck with doing this.  Can offer any suggestions?
| 
| This is what i have been trying to do:
| 
| {
| MAILDIR=$HOME/tmp
| :0 hw
| * ^Subject: save this \/[^.]*
| |FILE=$MATCH|echo $FILE > temp
| 
| (some more recipes that work)
| }
| 
| The log says it matches on the conditions leading to the PIPE, but then
| skips the pipe and moves on.

Your action line's syntax is bad; you can't pipe to an assignment (it doesn't
run any programs) and you can't pipe an assignment to something else (it
doesn't have any standard output).  Try this -- it will require yet another
level of braces:

  :0
  * ^Subject: save this \/[^.]*
  { FILE=$MATCH }
    :0Achi:temp.lock
    | echo $FILE > temp

I'm not sure whether the following will work (it *ought*, though):

  :0chi:temp.lock
  * ^Subject: save this \/[^.]*
  | echo $MATCH > temp
 

<Prev in Thread] Current Thread [Next in Thread>
  • Saving $MATCH, Bill McClatchie
    • Re: Saving $MATCH, David W. Tamkin <=