2

I want to number each line in a text file on Linux/solaris by nl command

but only from the third line - is it possible ? and if yes please advice how ?

for example

line1
line2
1 line3
2 line4
yael
  • 2,433
  • 5
  • 31
  • 43

1 Answers1

3
f=filename
head -2 $f; sed '1,2d' $f | nl
glenn jackman
  • 4,630
  • 1
  • 17
  • 20