Archive for August, 2014

Cat with line numbers

“cat” has always been an easy way to quickly look up a relatively small text file. However sometimes there is a need to have line numbers displayed too.

This is how it is done with cat:

cat -n file.txt

or even

cat file.txt | nl