diff options
-rw-r--r-- | src/scripts/xzgrep.in | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/scripts/xzgrep.in b/src/scripts/xzgrep.in index bfa9fb53..18f780a9 100644 --- a/src/scripts/xzgrep.in +++ b/src/scripts/xzgrep.in @@ -156,9 +156,9 @@ for i; do exec 5>&1 ($uncompress -- "$i" 5>&-; echo $? >&5) 3>&- | if test $files_with_matches -eq 1; then - eval "$grep" -q && { printf '%s\n' "$i" || exit 2; } + eval "$grep" >/dev/null && { printf '%s\n' "$i" || exit 2; } elif test $files_without_matches -eq 1; then - eval "$grep" -q || { + eval "$grep" >/dev/null || { r=$? if test $r -eq 1; then printf '%s\n' "$i" || r=2 |