Discussion:
bug#31280: zgrep foo binaryfilepath says "Binary file (standard input) matches"
Jim Avera
2018-04-27 04:33:54 UTC
Permalink
Hello,

There is a bug in zgrep (gzip) 1.6 where the output from zgrep
incorrectly says  "(standard input") instead the file path name given on
the command line.

This happens if the input data is not actually compressed, but is binary
data.

STEPS TO REPRODUCE:

perl -wE 'print "foobar",("\x0" x 1000)' > /tmp/testfile.dat  # make a
binary file
zgrep foobar /tmp/testfile.dat

RESULTS:

Binary file (standard input) matches

EXPECTED RESULTS:

Binary file /tmp/testfile.dat matches

Loading...