Date: Sat, 05 May 2001 10:00:18 +0100 From: Brian Somers <brian@Awfulhak.org> To: John Baldwin <jhb@FreeBSD.org> Cc: Brian Somers <brian@Awfulhak.org>, Kris Kennaway <kris@obsecurity.org>, Brian Somers <brian@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, brian@Awfulhak.org Subject: Re: cvs commit: src/usr.bin Makefile src/usr.bin/nl Makefile nl. Message-ID: <200105050900.f4590IB84808@hak.lan.Awfulhak.org> In-Reply-To: Message from John Baldwin <jhb@FreeBSD.org> of "Fri, 04 May 2001 16:11:23 PDT." <XFMail.010504161123.jhb@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> On 04-May-01 Brian Somers wrote: > >> > It essentially stuffs numbers in front of lines. > >> > >> About like "awk '{ printf "%d:%s\n", NR, $0 }'" then? > > > > That was my original argument (I suggested ``cat -n''), but nl does > > more than just that. See the man page. > > Can I tune my awk script appropriately so that I can obtain the desired results > in one line of awk that I can in one invocation of nl? > > Hmm, looking at the manpage, this wouldn't be that hard to do in awk. In fact, > requiring special lines to mark the start of sections, etc. almost hand tailors > this for awk or some other similar language. I wonder if this is simply a case > of a script converted to C. Awk is an interpreted C language. There are many things that could be re-implemented using it. The same thing holds true (even more so) for perl. > Then again, we have cut(1). There are probably lots more. > -- > > John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/ > PGP Key: http://www.baldwin.cx/~john/pgpkey.asc > "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ -- Brian <brian@Awfulhak.org> <brian@[uk.]FreeBSD.org> <http://www.Awfulhak.org> <brian@[uk.]OpenBSD.org> Don't _EVER_ lose your sense of humour ! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200105050900.f4590IB84808>