[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#8103: NUL terminated lines

From: Jim Meyering
Subject: bug#8103: NUL terminated lines
Date: Fri, 25 Feb 2011 21:09:17 +0100

Andreas Schwab wrote:
> Jim Meyering <address@hidden> writes:
>> Bjartur Thorlacius wrote:
>>> On 2/24/11, Jim Meyering <address@hidden> wrote:
>>>> With GNU tac, that has never worked:
>>>>     $ tac -s ''
>>>>     tac: separator cannot be empty
>>> NUL!=the empty string.
>> tac treats them the same way.
> Actually the shell does.  $'\0' and '' are indistinguishable once passed
> as argument.

I thought so, too.  Then I tried this:

    $ zsh  -c "printf \$'\0'|wc -c"
    $ bash -c "printf \$'\0'|wc -c"

The former prints a NUL byte.
The latter prints nothing.

So it depends on your shell.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]