From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <20130918092421.3ab18d46@Khezzara> References: <1482429.KLDYROpnPh@coil> <20130918092421.3ab18d46@Khezzara> Date: Wed, 18 Sep 2013 17:36:00 +1000 Message-ID: From: Bruce Ellis To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=f46d0438907d27d34604e6a37d3f Subject: Re: [9fans] how to output NUL byte from awk? Topicbox-Message-UUID: 809b6eb2-ead8-11e9-9d60-3106f5b1d025 --f46d0438907d27d34604e6a37d3f Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable spot on. that's why: printf "%c", 0 works, move on now. On 18 September 2013 17:24, Florian Limberger wrote: > On Tue, 17 Sep 2013 15:47:17 +0200 > dexen deVries wrote: > > > awk(1) says, ``[s]tring constants are quoted " ", with the usual C > > escapes recognized within.'', but \0 seems to terminate internal > > string reprezentation... > > > > so how do i output a real NUL byte? > > I know this is not very constructive and may seem like a dumb question, > but isn=E2=80=99t \0 the end marker for C strings? So this behaviour mi= ght be > expected? > > > -flo > --f46d0438907d27d34604e6a37d3f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
spot on. that's why:

printf "%c", 0
<= br>
works, move on now.


On 18 S= eptember 2013 17:24, Florian Limberger <flo@snakeoilproductions.= net> wrote:
On Tue, 17 Sep 2013 15:47:= 17 +0200
dexen deVries <dexen.devries@= gmail.com> wrote:

> awk(1) says, ``[s]tring constants are quoted " ", with the u= sual C
> escapes recognized within.'', but \0 seems to terminate intern= al
> string reprezentation...
>
> so how do i output a real NUL byte?

I =C2=A0know this is not very constructive and may seem like a dumb q= uestion,
but isn=E2=80=99t \0 the end marker for C strings? =C2=A0So this behaviour = =C2=A0might =C2=A0be
expected?


-flo

--f46d0438907d27d34604e6a37d3f--