9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Bruce Ellis <bruce.ellis@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] how to output NUL byte from awk?
Date: Wed, 18 Sep 2013 17:36:00 +1000	[thread overview]
Message-ID: <CAJQxxwmj4013CG2L=PAiZQf-Rrkv0L6==CFB7jzxZLwmfSYxRg@mail.gmail.com> (raw)
In-Reply-To: <20130918092421.3ab18d46@Khezzara>

[-- Attachment #1: Type: text/plain, Size: 649 bytes --]

spot on. that's why:

printf "%c", 0

works, move on now.


On 18 September 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 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’t \0 the end marker for C strings?  So this behaviour  might  be
> expected?
>
>
> -flo
>

[-- Attachment #2: Type: text/html, Size: 1587 bytes --]

      reply	other threads:[~2013-09-18  7:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-17 13:47 dexen deVries
2013-09-17 14:03 ` Kurt H Maier
2013-09-17 14:36   ` dexen deVries
2013-09-17 16:50   ` erik quanstrom
2013-09-17 17:12     ` dexen deVries
2013-09-17 18:55     ` dexen deVries
2013-09-17 19:07     ` Kurt H Maier
2013-09-17 19:21       ` cinap_lenrek
2013-09-17 17:50 ` arnold
2013-09-18  7:24 ` Florian Limberger
2013-09-18  7:36   ` Bruce Ellis [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJQxxwmj4013CG2L=PAiZQf-Rrkv0L6==CFB7jzxZLwmfSYxRg@mail.gmail.com' \
    --to=bruce.ellis@gmail.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).