Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!cmcl2!kramden.acf.nyu.edu!brnstnd From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein) Newsgroups: comp.unix.questions Subject: Re: How to add line numbers to a text file? Message-ID: <15248:Nov3018:01:4490@kramden.acf.nyu.edu> Date: 30 Nov 90 18:01:44 GMT References: <6826@uceng.UC.EDU> Organization: IR Lines: 9 In article <6826@uceng.UC.EDU> dmocsny@minerva.che.uc.edu (Daniel Mocsny) writes: > My question to all of you, however, is this: faced with the need to > number a text file from a shell script, how would you do it? I'm > kind of curious to see the variety of approaches possible. Would you > use C, awk, perl, sed, sh, cat, echo, expr, and/or dd? grep -n .* ---Dan