#TIL : Prepend line number to file


25 Mar 2018 / by KhanhIceTea

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


Sound good ?