HomeFreeBSD

bsdgrep(1): Don't exit before processing every file

Description

bsdgrep(1): Don't exit before processing every file

Given an empty pattern (i.e. grep "" A B), bsdgrep(1) would previously exit()
with the appropriate exit code upon encountering an empty file. Likely intended
as an optimization, but this behavior is technically incorrect since an empty
pattern should match every line.

PR: 220924
Reviewed by: emaste, cem (earlier version), ngie
Approved by: emaste (mentor)
Differential Revision: https://reviews.freebsd.org/D11698

Details

Provenance
kevansAuthored on
Reviewer
emaste
Differential Revision
D11698: bsdgrep(1): Don't exit before processing every file
Parents
rS321449: Install BSD.coverage.dist if MK_COVERAGE == no
Branches
Unknown
Tags
Unknown