procmail
[Top] [All Lists]

Re: time zones

1999-05-26 10:40:03
David asked:
Rik Kabel suggested,
|   "|IFS=' '; TZ=EST5EDT; export TZ && exec /usr/local/nuglops/bin/procmail 
-tf- MODE=prod || exit 75 #rik"

One question: shouldn't

"|IFS=' ' TZ=EST5EDT exec /usr/local/nuglops/bin/procmail -tf- MODE=prod || 
exit 75 #rik"

do the job (or maybe 'exec' has to go first?)?

In many cases they should do the job equally, however exec is one of the
commands for which this doesn't work. Quoting from a ksh manpage:

          The environment for any simple-command or function may be
          augmented by prefixing it with one or more variable
          assignments.  A variable assignment argument is a word of
          the form identifier=value.  Thus:

               TERM=450 cmd args                  and
               (export TERM; TERM=450; cmd args)

          are equivalent (as far as the above execution of cmd is
          concerned except for special commands listed below that are
          preceded with a dagger).

And wuddenyaknowit, exec has a dagger.

-- 
Rik Kabel          Old enough to be an adult              
rik(_at_)netcom(_dot_)com

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