abuseofcats.com — stop abusing cat(1)

This title could be clearer and more informative.Try out Clickbait Shieldfor free (5 uses left this month).

A short public service announcement pointing out the common misuse of the cat(1) command in Unix/Linux shell pipelines. When cat is used solely to feed a single file into another command (like grep, wc, head, awk, or sort), it spawns an unnecessary process — because most of those tools can open files directly. cat's actual purpose is concatenating multiple files. Several before/after examples illustrate the correct, more efficient alternatives.

1m read timeFrom abuseofcats.com
Post cover image
167.6K Impressions5 Comments