Re: [gentoo-user] OT prefixing Line numbers in codes for printing

2005-04-26 Thread Edward Catmur
On Tue, 2005-04-26 at 11:22 +0900, Steve B wrote: > On an even more off topic note.. anybody know how use some nifty CSS > or similar to take a block of text (code) and automaticly add line > numbers? I guess I could use PHP but was looking for a CSS type style. Nice idea, but I don't think the li

Re: [gentoo-user] OT prefixing Line numbers in codes for printing

2005-04-25 Thread Ow Mun Heng
On Mon, 2005-04-25 at 12:08 +0200, Etaoin Shrdlu wrote: > On Monday 25 April 2005 10:00, Ow Mun Heng wrote: > > > On Mon, 2005-04-25 at 03:52 -0400, Willie Wong wrote: > > > The command nl > > > It is part of coreutils > > > > > > `man nl' to see usage. > > > > Hmm.. this is even simple than using

Re: [gentoo-user] OT prefixing Line numbers in codes for printing

2005-04-25 Thread Steve B
On 4/25/05, Etaoin Shrdlu <[EMAIL PROTECTED]> wrote: > On Monday 25 April 2005 10:00, Ow Mun Heng wrote: > > > On Mon, 2005-04-25 at 03:52 -0400, Willie Wong wrote: > > > The command nl > > > It is part of coreutils > > > > > > `man nl' to see usage. > > > > Hmm.. this is even simple than using gr

Re: [gentoo-user] OT prefixing Line numbers in codes for printing

2005-04-25 Thread Etaoin Shrdlu
On Monday 25 April 2005 10:00, Ow Mun Heng wrote: > On Mon, 2005-04-25 at 03:52 -0400, Willie Wong wrote: > > The command nl > > It is part of coreutils > > > > `man nl' to see usage. > > Hmm.. this is even simple than using grep or using sed. using cat -n or cat -b is even simpler :) (but nl is

Re: [gentoo-user] OT prefixing Line numbers in codes for printing

2005-04-25 Thread Ow Mun Heng
On Mon, 2005-04-25 at 03:52 -0400, Willie Wong wrote: > The command nl > It is part of coreutils > > `man nl' to see usage. Hmm.. this is even simple than using grep or using sed. haha.. Thanks -- Ow Mun Heng Gentoo/Linux on DELL D600 1.4Ghz 98% Microsoft(tm) Free!! Neuromancer 15:59:41 u

Re: [gentoo-user] OT prefixing Line numbers in codes for printing

2005-04-25 Thread Willie Wong
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

[gentoo-user] OT prefixing Line numbers in codes for printing

2005-04-24 Thread Ow Mun Heng
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?]