Bug 238380 - zgrep: Allow multiple options '-e'
Summary: zgrep: Allow multiple options '-e'
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs mailing list
Keywords: patch
Depends on:
Reported: 2019-06-07 10:15 UTC by Ganael LAPLANCHE
Modified: 2020-02-06 22:18 UTC (History)
1 user (show)

See Also:

Patch (1.26 KB, text/plain)
2019-06-07 10:15 UTC, Ganael LAPLANCHE
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ganael LAPLANCHE freebsd_committer 2019-06-07 10:15:07 UTC
Created attachment 204872 [details]

Currently, zgrep only allows a single option -e to be processed :

$ echo -e 'foo\nbar\nbaz' > test.txt
$ gzip test.txt

$ zgrep -e foo -e bar test.txt.gz
zcat: can't stat: -e: No such file or directory
zcat: can't stat: bar: No such file or directory

The attached patch allows to pass several options -e as one would do with standard grep(1) command.
Comment 1 Ganael LAPLANCHE freebsd_committer 2020-02-06 16:53:41 UTC

Any volunteer to review that PR ?

Thanks :)
Comment 2 Mark Johnston freebsd_committer 2020-02-06 16:57:25 UTC
(In reply to Ganael LAPLANCHE from comment #1)
Could you please create a phabricator review and tag me?
Comment 3 Ganael LAPLANCHE freebsd_committer 2020-02-06 22:18:29 UTC
Hello Mark,

Here is the link to the review :


Thanks a lot!