procmail
[Top] [All Lists]

Re: If VAR != VAR2

2008-01-10 13:13:52
LuKreme schreef:
David W. Tamkin:

  :0D
  * VAR ?? [A-Z]
  action

will do the job without the shell call and without the tr call.

OK, yes, this is much much better:

  :0D
  * USER ?? [A-Z]
  {
      USER=`echo $USER | tr "[:upper:]" "[:lower:]"`
      LOG="Translated $USER to $USER1$NL"
  }

Thanks.  Should have seen it before with my previous email, but I've
not had any coffee yet! :)

ITYM:

  :0D
  * USER ?? [A-Z]
  {
      USER1=$USER
      USER=`echo $USER1 | tr "[:upper:]" "[:lower:]"`
      LOG="Translated $USER1 to $USER$NL"
  }

For a pure-procmail tr, see xlt in http://www.xs4all.nl/~rvtol/procmail/

-- 
Groet, Ruud

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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