Skip to content

Latest commit

 

History

History
15 lines (8 loc) · 263 Bytes

Prepend-line-number-to-file.md

File metadata and controls

15 lines (8 loc) · 263 Bytes
  • Date : 2018-03-25
  • Tags : #sysadmin #file #string

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