In the last episode (Nov 11), Paul Eggert said:
> Most likely this is because the output of your `set' command contains
> binary data.  In the past, this has been reported by people whose `set'
> command would output something like this:
> 
> IFS='   
> ^@'
> 
> where the `^@' in my message denotes a single NUL byte (control-@) in
> the original.  If this is what's happening to you, then this is quite
> possibly a bug in your shell, since environment variables cannot
> possibly contain NUL bytes in Unix.

Aah, but 'set' prints the value of all shell variables, exported or
not.  You can store any value in a shell variable. In fact, I do things
like this quite often (/bin/sh example here - zsh can do the same
without forking to set a):

a=$(cat file.gif) 
size=${#a}
echo Content-Length: $size
echo Content-Type: image/gif
echo
echo -n $a

I agree that _environment_ variables can't have NULs in them.

-- 
        Dan Nelson
        [EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to