From owner-cvs-all Fri May 4 16:16: 9 2001 Delivered-To: cvs-all@freebsd.org Received: from meow.osd.bsdi.com (meow.osd.bsdi.com [204.216.28.88]) by hub.freebsd.org (Postfix) with ESMTP id 0C8BD37B43F; Fri, 4 May 2001 16:16:03 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: from laptop.baldwin.cx (john@jhb-laptop.osd.bsdi.com [204.216.28.241]) by meow.osd.bsdi.com (8.11.2/8.11.2) with ESMTP id f44NFaG14282; Fri, 4 May 2001 16:15:36 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200105042255.f44MtdB60903@hak.lan.Awfulhak.org> Date: Fri, 04 May 2001 16:11:23 -0700 (PDT) From: John Baldwin To: Brian Somers Subject: Re: cvs commit: src/usr.bin Makefile src/usr.bin/nl Makefile nl. Cc: Kris Kennaway , Brian Somers , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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. Then again, we have cut(1). -- John Baldwin -- 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/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message