#TIL : Prepend line number to file

Mar 25, 2018 4 mins read 8d4302659

Prepend line number to file

When you want to prepend line number in every line of file, use the -n flag of cat tool.

Example :

cat -n a.txt

Or even from many file

cat -n a.txt b.txt c.txt

comments powered by Disqus