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 _

document that echo can't be given a NULL

2006-03-10 Thread Dan Jacobson
No way to hand echo or /bin/echo a NULL. $ set a $'\x00' b $ echo $# 3 $ echo A$'\x01'B|wc -c 4 $ echo A$'\x00'B|wc -c 3 $ echo -n `echo -ne 000`|wc -c 0 BASH_VERSION='3.1.0(1)-release' At least the echo docs should say so. ___ Bug-bash mailing lis