Hacker News new | ask | show | jobs
by mortehu 3160 days ago
Just pipe the output through cat. By default, the "pipefail" option is not set, so

    echo foo | grep bar | cat
is successful. Of course, this works for any command.
1 comments

Alternatively and less wastefully:

    echo foo | grep bar || true
Alternatively and shorter:

    echo foo | grep bar || :