Skip to content

Comment on Cat without cat on the commandline (2020)

Comments

Shell scripting is one of those places where readability is king, and premature optimization is the devil.

Yes, there are multiple ways to get by without cat. Are they as obvious to understand? If not, what are we doing?

Shell scripting isn't meant for performance but composability. If you're fighting me over micro optimizations, I'm just going to rewrite it in a proper language and 100x its performance. But then it's lost its readability and it's no longer editable.

Balance, like most things in life.

At a certain point, it's not a problem with readability but that the reader doesn't actually know the language.

Is it a readability problem if someone is confused about foreach loops in Java, or perhaps we should expect the person to actually learn the language they are using?

Input redirection is a fundamental shell language feature.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.