TIL: With extra flag -n
we can print the line numbers in cat
command.
(No need to load file in vim for line numbers anymore :) )
Command
$ cat -n filename
Bonus
You can use bat
(as they call it, cat
with wings), if you want:
- Syntax Highlighting
- Line numbers
- Paging
- pipe like in cat.
- etc
- Visit github profile for more.
Top comments (0)