HomeFreeBSD

grep: fix combination of quite and count flag

Description

grep: fix combination of quite and count flag

When the quite (-q) flag is provided, we don't expect any output.
Currently, the behavior is broken:
$ grep -cq flag util.c
1

$ grep -cs flag util.c
55

First of all, we print a number to stdout. Secondly, it just returns
0 or 1 (which is unexpected). GNU grep with c and q flags doesn't
print anything.

Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D31108

Details

Provenance
oshogboAuthored on Jul 9 2021, 12:09 PM
Reviewer
markj
Differential Revision
D31108: grep: fix combination of quite and count flag
Parents
rG84992a3251d5: sctp: provide sac_error also for ABORT chunk being sent
Branches
Unknown
Tags
Unknown