A Quick Bash Tip: View File Contents With The Line Numbers

Aug 14, 2018 · Updated: Jul 12, 2021 · by Tim Kamanin

Bash tip I've just discovered:

Next time when you do cat command to view file contents, pass the -n parameter and you'll see file source with the line numbers!

Very handy:

cat -n file.whatever

Hey, if you've found this useful, please share the post to help other folks find it:

There's even more:

Subscribe for updates

  • via Twitter: @timonweb
  • old school RSS:
  • or evergreen email ↓ ↓ ↓