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

1 Answer 1

3
f=filename
head -2 $f; sed '1,2d' $f | nl

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .