≡ Menu

nl command

Linux / Unix: Add Line Numbers To Files

I know how to display line numbers using vim text editor. How do display line numbers in the left side for any text file under Unix or Linux operating systems?
[click to continue…]

Linux/Unix: Cat Command Display Line Numbers

How do I use the cat command to display the line numbers for a file called myapp.c under Linux or Unix like operating systems?
[click to continue…]

Shell Script To Number Lines Of Files

Q. How do I number each line of a text file? How do I write a shell script to display text file with line numbers added?
[click to continue…]