News for hackers. Stuff that matters.
Re:PSA about abuse of cat(1) command. Don't abuse cats by adrian_b on Saturday July 18, 2026 @12:37AM (#48955266)
The simpler and better way to write your pipeline is:

"< file.txt somecommand | othercommand | anothercommand"

There is never any need for "cat".

When such a pipeline is used repeatedly in a script, the time for executing the redundant process "cat" can easily add up to a noticeable delay.

Re:PSA about abuse of cat(1) command. Don't abuse cats by mcphage on Saturday July 18, 2026 @09:25AM (#48957970)
That’s neither simpler, nor better.

> "cat" can easily add up to a noticeable delay.

If you have a slow script, you will have more useful places to optimize than removing calls to cat.