Pattern: Piping command output to echo
Issue: -
You are piping command output to echo
, but echo
ignores all piped input.
In particular, echo
is not responsible for putting output on screen. Commands already output data, and with no further actions that will end up on screen.
Example of incorrect code:
find . | echo
Example of correct code:
find .