procmail
[Top] [All Lists]

Re: Help w/splitting

1998-09-13 10:00:23

Aaron Schrab has already pointed out the major problem (quoting).
I just wanted to point out another:

Dave Wells <wellsian(_at_)netgate(_dot_)net> writes:
Can anyone tell me what's wrong with this?  I'm trying to split some old
email archives into individual files while stripping unimportant header
fields.  From my shell I'm trying: 

 % set FILENO=0000

This is incorrect.  If this is being run under csh or tcsh, then that
should be written:

        setenv FILENO 0000

If this is under a Bourne shell derivative (sh, ksh, bash, etc), then
that should be written:

        FILENO=0000
        export FILENO

What you have currently either creates a local shell variable FILENO,
not visible to other programs (csh/tcsh), or sets $1 to "FILENO=0000"
(sh/ksh/bash).

Note: many people write sh environment assignments like this:

        export FILENO=0000

This is *not* guaranteed to work, and indeed doesn't on many systems,
so don't do it.


Philip Guenther

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