[Bug 247126] zgrep(1) does not handle -f FILE correctly
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sat Jul 11 23:25:56 UTC 2020
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=247126
Craig Leres <leres at freebsd.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|Open |In Progress
--- Comment #10 from Craig Leres <leres at freebsd.org> ---
Here are some additional regressions the review has turned up (so far):
Flag processing ends after the first -e PATTERN:
echo foobar > test
grep -e foo -i < test
foobar
zgrep -e foo -i < test
zcat: can't stat: -i: No such file or directory
This bug hides another bug; multiple -e patterns are supposed to behave
like multiple patterns in a -f file:
echo foobar > test6
echo howdy >> test6
grep -e foo -e how test6
foobar
howdy
The zgrep wrapper only uses the last -e pattern seen.
Long flags that end with certain characters:
echo foobar > test
grep -e foo --ignore-case < test
foobar
zgrep -e foo --ignore-case < test
zcat: can't stat: --ignore-case: No such file or directory
Long flags that take arguments are problematic as well:
echo tiresome > test5
grep --regexp=some test5
tiresome
zgrep --regexp=some test5 < /dev/null
test5:tiresome
zcat: (stdin): unexpected end of file
No whitespace between a flag and its argument:
echo foobar > test
grep -efoo test
foobar
zgrep -efoo test < /dev/null
zcat: (stdin): unexpected end of file
test:foobar
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list