How to print out text with line numbers in Linux

How to print out a plain text file with line numbers in Linux?

asked Mar 31, 2014 by Eric Z Ma (44,280 points)

1 Answer

 
Best answer

Use the nl command:

nl text-file

Find options in the nl manual.

answered Mar 31, 2014 by Eric Z Ma (44,280 points)

Please log in or register to answer this question.

Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost

...