Hacker News new | ask | show | jobs
by adrian_b 13 days ago
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.

1 comments

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.