Hacker News new | ask | show | jobs
by jshb 5503 days ago
Why does cat need the ability to add line numbers anyway? It seems outside the scope of it's purpose. Next it'll need ability to translate Russian to English.

If I ever needed line numbering, I would output into a file and open it in a far more capable text editor/viewer that was designed for doing that well.

1 comments

Indeed - `nl` should be preferable to `cat -n` for that reason even if for no others. People have been actually saying this since at least 1983 (http://harmful.cat-v.org/cat-v/).

I'm often surprised that cat is anywhere near as popular as it is. I think I've used it for actual file concatenation maybe two times in the past three years.