FG
💻 Software

What is the general consensus on "Useless use of cat"?

Fresh5 days ago
Mar 15, 202612948 views
Confidence Score0%
0%

Problem

When I pipe multiple unix commands such as grep, sed, tr etc. I tend to specify the input file that is being processed using cat. So something like . But recently after a couple of comments left on my answers indicating that this was a useless use of cat, I thought I would ask the question here. I …

Error Output

cat file | grep ... | awk ... | sed ...

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: What is the general consensus on "Useless use of cat"?

Low Risk

I often use in examples. Sometimes I am being accused of Useless use of cat (http://www.iki.fi/era/unix/award.html). I disagree for the following reasons: It is easy to understand what is going on. When reading a UNIX command you expect a command fo…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment