Pipes are an inefficient way of dealing with commands

Software ResiliencyProgramming Best Practices

Why you should care

Pipes take the output of one command and put it on the input of another command. They can also be strung together. This way, one can find matches in a particular pattern in their name AND have a particular IP address range.
However the disadvantage is that it can be wasteful in nature and the code tends to be more efficient with a single awk command.

Business Impacts

Using pipes in a program can be a risky decision as it tends to be wasteful in both time and productivity.

Production Risk

How we detect

This code insight counts one violation each time a command is piped into another.


About CAST and Highlight’s Code Insights

Over the last 25 years, CAST has leveraged unique knowledge on software quality measurement by analyzing thousands of applications and billions of lines of code. Based on this experience and community standards on programming best practices, Highlight implements hundreds of code insights across 15+ technologies to calculate health factors of a software.

See featuresHow it works