Antonio Macchi wrote:

> but...
> 
> $ printf one$'\x00'two\\n
> 
> +-+-+-+-+-+-+--+
> |p|r|i|n|t|f|\0|
> +-+-+-+-+-+-+--+
> 
> +-+-+-+--+-+-+-+--+--+
> |o|n|e|\0|t|w|o|\n|\0|
> +-+-+-+--+-+-+-+--+--+
> 
> so the output should be "one", and stop here!
> 
> but the real output is
> onetwo
> 
> so, imho, there's something more...
> 
> 
> 
> 
>> imadev:~$ echo $'foo\0bar'
>> foo
> 
> 
> sorry... I'm a little bit confusing... look
> 
> $ echo foo$'\0'bar
> foobar

You still fail to read the other answers. Hint: read them (and I do mean 
it), then find out how each command expands its arguments, what is seen by 
bash, and what is seen by the commands.

Reply via email to