Topic: https://brettterpstra.com/2015/11/24/shell-tricks-quick-line-numbering/
hide preview

What's next? verify your email address for reply notifications!

unverified 5y, 300d ago

cat has an option for this too: cat -n file.txt

demo from pipe:

echo -e 'a\nb' | cat -n 1 a 2 b

hide preview

What's next? verify your email address for reply notifications!