The command nl It is part of coreutils `man nl' to see usage.
W On Mon, Apr 25, 2005 at 02:17:17PM +0800, Ow Mun Heng wrote: > Hi, > > What's the best way to prefix lines of codes with line numbers for > easier lookup and printing? > > eg: > line 1 > line 2 > > becomes > 1: line 1 > 2: line 2 > > I'm currently doing > > grep -n "" source-code > > What's the equilvalent to doing it with sed?? > > cat source-code | sed 's:^:[What do I put here?]:g' > > > -- > Ow Mun Heng > Gentoo/Linux on DELL D600 1.4Ghz > 98% Microsoft(tm) Free!! > Neuromancer 14:12:49 up 17:19, 8 users, load average: 0.04, 0.18, 0.14 > > > -- > gentoo-user@gentoo.org mailing list -- ---------------------------------------------------------------- * Address: 45 Spelman Hall, Princeton University 08544 * * Phone: x68958 AIM: AngularJerk * * E-mail: [EMAIL PROTECTED] From: sep.dynalias.net * ---------------------------------------------------------------- Yang: "I want to take Engineering mathematics, which is probability this term, and applied mathematics, which is linear algebra this term." Yang's AA at National Taiwanese University: "What? Do you want to be an engineering medicine doctor?" Sortir en Pantoufles: up 13 days, 17:51 -- gentoo-user@gentoo.org mailing list