Closed maxice8 closed 3 years ago
This is the documented behavior of pipeline statuses.
The exit status of a pipeline is considered true if and only if every
command in the pipeline exits true.
The sigpipe
occurs because grep is exiting early, so strings
writes to a broken pipe.
Thanks for the quick explanation
trying
always fail since the resulting status is
sigpipe 0
, the same does not happen if one usesgrep -x archive/zip >/dev/null