Re: document that echo can't be given a NULL

2006-03-10 Thread Eric Blake
> No way to hand echo or /bin/echo a NULL. You mean NUL, not NULL. And printf can do it. > $ set a $'\x00' b > $ echo $# > 3 > $ echo A$'\x01'B|wc -c > 4 > $ echo A$'\x00'B|wc -c > 3 Here, command substitutions strip all NULs from the command's output. POSIX doesn't specify whether this behavi

Re: document that echo can't be given a NULL

2006-03-10 Thread Paul Jarc
Dan Jacobson <[EMAIL PROTECTED]> wrote: > No way to hand echo or /bin/echo a NULL. For /bin/echo, that's because execve() uses null-terminated strings. For bash's builtin echo, it could be done, but then it would be inconsistent with external commands, which might be surprising. paul _