commit | 0ba879cdba1311a99895938bf8442425ed29cfe4 | [log] [tgz] |
---|---|---|
author | Michael Forney <mforney@mforney.org> | Fri May 13 23:34:52 2016 -0700 |
committer | sin <sin@2f30.org> | Sat May 14 12:58:38 2016 +0100 |
tree | 0ee17645f21a92fd4e2faec19d27fbe6837aa1eb | |
parent | e6b3af07cf5488dde5da9bc7f15353c06216e51c [diff] |
grep: Fix -v output and exit status Previously, it printed lines that didn't match some pattern. Instead, it should print lines that don't match *any* pattern. Test case: out=$(echo foo | ./grep -v -e foo -e bar) if [ "$?" = 1 ] && [ -z "$out" ] ; then echo pass else echo fail fi