zgrep -<NUM> doesn't work if <NUM> is two digits or greater
Bug #1032831 reported by
Thomas Bushnell, BSG
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gzip |
Fix Committed
|
Undecided
|
|||
gzip (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Create a gzipped file:
$ for i in $(seq 1 100); do echo $i; done > file.txt
$ gzip file.txt
Then:
$ zgrep -9 17 file.txt.gz
8
9
...
25
26
works. But:
$ zgrep -10 17 file.txt.gz
gzip: 17.gz: No such file or directory
fails.
Note that "grep -9 17 file.txt" and "grep -10 17 file.txt" work just fine.
Changed in gzip: | |
status: | New → In Progress |
To post a comment you must log in.
Thank you for your bug report. I can reproduce your issue on Ubuntu 12.04 (gzip: 1.4-1ubuntu2). This is an upstream bug, therefore it would be great if you could forward the bug to the developers. As far as I can see, they are not using a bug tracker but a mailing list: https:/ /lists. gnu.org/ mailman/ listinfo/ bug-gzip
Note that a workaround exists: Both
zgrep -C 10 17 file.txt.gz
and
zgrep --context=10 17 file.txt.gz
give the expected result.