9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Kurt H Maier <khm@sciops.net>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] how to output NUL byte from awk?
Date: Tue, 17 Sep 2013 19:07:55 +0000	[thread overview]
Message-ID: <20130917190755.Horde.hC1rtvUyWEAln7yGFt2EGw7@ssl.eumx.net> (raw)
In-Reply-To: <d1ad32e7589bccd0e90316978fcce125@ladd.quanstro.net>

Quoting erik quanstrom <quanstro@quanstro.net>:

> On Tue Sep 17 10:04:20 EDT 2013, khm@sciops.net wrote:
>
> no, awk's printf does not do that:
> minooka;  awk 'BEGIN{printf "%c", utf(0)}' | wc

not if you ask it to convert '0' to unicode and then covert
the unicode value to a char, no.   I'm almost positive if you
tell it to cast 0 (the number) to char and print it, it will
give you a null byte.

khm





  parent reply	other threads:[~2013-09-17 19:07 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 [this message]
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

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=20130917190755.Horde.hC1rtvUyWEAln7yGFt2EGw7@ssl.eumx.net \
    --to=khm@sciops.net \
    --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).