View a File with Line Numbers

Contributor Icon Contributed by qmchenry  
Tag Icon Tagged: UNIX  

Using the cat command in UNIX, a file can be displayed with the line number of each line preceding the line.

Here is an example of displaying the file filename with line numbers:

cat -n filename

 

2 Comments -


No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment -