Hacker News new | ask | show | jobs
by copperx 14 days ago
I like piping the output of cat and the mental image of one process feeding another. It's inconsequential, but it brings an epsilon of joy.
2 comments

You have exactly the same mental image if you start a pipeline in the right way, with a file redirection: "<input_file cmd1 | cmd2 | cmd3 ...".

This adds the joy of doing only what is really needed, without extraneous effort.

Moreover, in this way the start of a pipeline becomes symmetrical to its end, which frequently is an output redirection.

same I just like monads lol. cat + pipe feels purer and has lower mental load for me, which dominates the efficiency of spawning an extra process for, typically, a few microseconds.
Exactly. It allows for a consistent pattern:

cmd1 | cmd2 | cmd3 | ... | cmdn