9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Steve Simon" <steve@quintile.net>
To: 9fans@9fans.net
Subject: Re: [9fans] trailing newline in awk
Date: Thu, 26 Jan 2012 13:20:40 +0000	[thread overview]
Message-ID: <ef440dd21b4a252fbae1b4d126e50f2f@quintile.net> (raw)
In-Reply-To: <201201261315.09613.dexen.devries@gmail.com>

Interesting one.

Both sed and awk has treat EOF as a line terminator
so either of these will work:

	awk '{print}' junk
	sed '' junk

but sam doesn't seem to regard a line without a newline as
having an end, so its not simple here:

	{ echo ',x/$?\n/ c/\n/' ; echo '1,$p' } | sam -d junk >[2] /dev/null

-Steve



  parent reply	other threads:[~2012-01-26 13:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-26 12:15 dexen deVries
2012-01-26 13:17 ` hugo rivera
2012-01-26 13:20 ` Steve Simon [this message]
2012-01-26 15:32 ` Jonathan Cast

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=ef440dd21b4a252fbae1b4d126e50f2f@quintile.net \
    --to=steve@quintile.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).