3 ms·
It's a pet peeve of mine to see cat [one-file] | less `less` takes a file as an argument. less [one-file] only requires you to run one program, and I/O
by onewland 17y ago
It's a pet peeve of mine to see
cat [one-file] | less
`less` takes a file as an argument.
less [one-file]
only requires you to run one program, and I/O tends to be really slow.
- prodigal_erik 17y agoYou're not the only one, this inspired the Useless Use of Cat Award (a few other strange practices are covered here as well): http://partmaps.org/era/unix/award.html http://partmaps.org/era/unix/award.html
- jiaaro 17y agoand when you're reading log files, you often only care about the last handful of lines anyhow: tail errors.log or if you want, say, 50 lines of output (instead of 10): tail errors.log -n 50