]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
zgrep: fix exit status with multiple files
authorEric van Gyzen <vangyzen@FreeBSD.org>
Thu, 1 Oct 2020 21:48:22 +0000 (21:48 +0000)
committerEric van Gyzen <vangyzen@FreeBSD.org>
Thu, 1 Oct 2020 21:48:22 +0000 (21:48 +0000)
commit63c8336d4de15085d50c9d8c855cdc97ee018a04
tree3d5efee44aa41a41cebb8a303dc2ab96abfff9eb
parent36972ee3e0fe8474e85646d0a2f1de9247a1e66a
zgrep: fix exit status with multiple files

zgrep should exit with success when given multiple files and the
pattern is found in at least one file.  Prior to this change,
it would exit with success only if the pattern was found in _every_ file.

Reviewed by: dab ngie
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D26616
contrib/netbsd-tests/usr.bin/grep/t_grep.sh
usr.bin/grep/zgrep.sh