procmail
[Top] [All Lists]

Re: Message tag suffix

1997-09-04 11:39:39
Thanks, David!

One extreme caution about that: if you use $$ in a procmailrc action that
invokes a shell, the shell will substitute its own PID for "$$" instead of
procmail's.  (The same will happen with $- but not with the named form
$LASTFOLDER.)  The workaround is to assign

  PID = $$

in the procmail rcfile before using it in an action line; then refer to it
as $PID.

The more I thought about it, the more I figured using the PID was
the best solution, so thanks HEAPS for the warning about the $$
passage. Since I couldn't be sure that each procmail invocation
would generate a system unique identifier, the PID is pretty
much guaranteed to be so.

One last question in general.

I've seen lots of various "OR" statements. Is the following a
valid "OR" based:

:0
* RECIPT ?? 
(^^owner-trust-list@|^^trust-list-approval@|^^owner-trust-list-outgoing@|^^owner-trust-list-archive@|^^owner-trust-list-request@)
{ ... }

or can I "reduce" this to:

:0
* RECIPT ?? 
^^(owner-trust-list@|trust-list-approval@|owner-trust-list-outgoing@|owner-trust-list-archive@|owner-trust-list-request@)
{ ... }

I typically have a horrible time with RE's, so I figured I'd get
a thumbs-up from a gang that doesn't.

---
Bob Gahl KD6KMX Bicycle (Ryan Vanguard) Mobile  ||      @
      ARPA/INTERNET: bgahl(_at_)thesphere(_dot_)com        ||   !_ \
    WWW: http://www.thesphere.com/~bgahl/       ||   (*)-~--+--(*)
"If you're trying to be politically correct you're like a chameleon
 in front of a mirror. What can you say that won't be offensive to
 somebody?"                                        Robin Williams

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