procmail
[Top] [All Lists]

Avoiding unnecessary call

2001-01-02 07:45:21
Hi,

I have the following recipe:

  :0
  * ^Envelope-To: stemformulieren(_at_)sisterray\(_dot_)xs4all\(_dot_)nl
  {
          :0                                                            
          * ^Subject: .*\/nl\.[^   ]+                                   #1
          { NG = $MATCH }
  
          # Is CFV for $NG running? If yes, save in it's directory.     
          RUNNING=`grep -i ${NG}.*Running ${VOTEDIR}/stemmingen.txt`    #2
          :0A                                                           #3
          * RUNNING ?? $NG
          {
                  :0c:
                  $VOTEDIR/$NG/backup/votes
  
                  :0:
                  $VOTEDIR/$NG/votes
          }
  
        [other recipes here]
  }


I have this call (#2) to grep to find out if a $NG and 'running' can be
found in a specific file. if the recipe just before that call is not
matched (#1) the recipe at #3 will not be executed. However the call
will still be done - i understand this.

Is there a easy way to avoid that call if the recipe at #1 is not
matched? I can think of another nested recipe, but isn't there a more
easy way?

Hope this explains my 'problem', english not my first language...

Thanks in advance,

        -R.

-- 
# rejo(_at_)sisterray(_dot_)xs4all(_dot_)nl (pgp: see headers) - 
http://www.sisterray.nl
_______________________________________________
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>