From: Arkadiy on
Thanks in advance,

Arkadiy
From: Xavier Roche on
printf "\x00"
or
echo -en "\x00"

From: Arkadiy on
On Mar 12, 11:20 am, Xavier Roche <xro...(a)free.fr.NOSPAM.invalid>
wrote:
> printf "\x00"
> or
> echo -en "\x00"

I don't think this works -- the null character is interpreted as the
end of the string :(
From: Andrew Poelstra on
On 2010-03-12, Arkadiy <vertleyb(a)gmail.com> wrote:
> On Mar 12, 11:20�am, Xavier Roche <xro...(a)free.fr.NOSPAM.invalid>
> wrote:
>> printf "\x00"
>> or
>> echo -en "\x00"
>
> I don't think this works -- the null character is interpreted as the
> end of the string :(

printf definitely works - usually I use it when checking SMTP
strings, like so:

printf "\0username\0pass" | base64

Which gives a different result thana:

printf "usernamepass" | base64

or

printf "" | base64

which would be the same if \0 was the end of the string.

--
Andrew Poelstra
http://www.wpsoftware.net/andrew
From: Nicolas George on
Arkadiy wrote in message
<100be8a1-f7bf-4a70-acaf-37203b3cf375(a)o30g2000yqb.googlegroups.com>:
>> printf "\x00"
> I don't think this works -- the null character is interpreted as the
> end of the string :(

printf never sees a NUL character, it sees a backslash, an x and two zeros
and decides to output a NUL instead.