When I need to suppress some kind of output e.g.
foo | grep -v bar
But foo gives sometimes only:
grep will return -1. How do I transform the exit code 1 to 0?
You could always try piping it through something else, like cat, to get rid of the exit code from grep - though that may be a bigger hammer than you want.
Sign up using Google
Sign up using Facebook
Sign up using Stack Exchange
4 years ago