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
3
f=filename
head -2 $f; sed '1,2d' $f | nl

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.