9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Geoff Collyer <geoff@collyer.net>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] text utility
Date: Mon, 28 Jul 2003 14:58:58 -0700	[thread overview]
Message-ID: <4e9a248eadf51083ac5d918159014eda@collyer.net> (raw)
In-Reply-To: <1064.3f2242e3.bedc3@blake.inputplus.co.uk>

Of course "cat -n" is almost as evil as "cat -v" (-v has a
sublanguage) and doesn't work on Plan 9:

	cpu% cat -n
	cat: can't open -n: '-n' directory entry not found

One could use "pr -tn" instead of the little awk script, but the
difference in speed really isn't that great.  Reading a cached ~2.5MB
file of ~250K lines,

cpu% time awk '{print NR, $0}' test >/dev/null
2.85u 0.13s 3.53r 	 awk {print NR, $0} test
cpu% time pr -tn test >/dev/null
1.75u 0.13s 2.18r 	 pr -tn test



  reply	other threads:[~2003-07-28 21:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-21 11:45 pac
2003-07-21 11:52 ` boyd, rounin
2003-07-22 14:09   ` rog
2003-07-22 14:35     ` boyd, rounin
2003-07-22 16:43       ` rog
2003-07-22 23:28     ` Geoff Collyer
2003-07-23 15:05       ` rog
2003-07-23 18:42         ` Dan Cross
2003-07-24  9:19           ` matt
2003-07-28  8:47       ` Ralph Corderoy
2003-07-28 21:58         ` Geoff Collyer [this message]
2003-07-30  8:25           ` Ralph Corderoy

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=4e9a248eadf51083ac5d918159014eda@collyer.net \
    --to=geoff@collyer.net \
    --cc=9fans@cse.psu.edu \
    /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).