From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4e9a248eadf51083ac5d918159014eda@collyer.net> To: 9fans@cse.psu.edu Subject: Re: [9fans] text utility From: Geoff Collyer In-Reply-To: <1064.3f2242e3.bedc3@blake.inputplus.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Mon, 28 Jul 2003 14:58:58 -0700 Topicbox-Message-UUID: 07b2df8c-eacc-11e9-9e20-41e7f4b1d025 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