Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!ncar!boulder!skwu From: skwu@boulder.Colorado.EDU (WU SHI-KUEI) Newsgroups: comp.unix.questions Subject: Re: How to add line numbers to a text file? Message-ID: <30544@boulder.Colorado.EDU> Date: 3 Dec 90 16:14:41 GMT References: <6826@uceng.UC.EDU> <15248:Nov3018:01:4490@kramden.acf.nyu.edu> <8518@tekgvs.LABS.TEK.COM> Sender: news@boulder.Colorado.EDU Reply-To: skwu@spot.Colorado.EDU (WU SHI-KUEI) Organization: University of Colorado, Boulder Lines: 13 Nntp-Posting-Host: spot.colorado.edu With System V you have several choices for numbering lines in text files, none of which use sed, awk, perl etc., etc.: 1. If the document will be formatted with n/troff, turn on line numbering with the .nm request. 2. If the document has been formatted and is paginated, 'pr -tn file' will do just fine if you don't mind having all lines numbered. 3. The line numbering filter 'nl' offers all sorts of options worth exploring. Regardless of your choice, RTFM.