bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#33898: grep reports binary file matches even with -I option


From: Britton Kerin
Subject: bug#33898: grep reports binary file matches even with -I option
Date: Fri, 28 Dec 2018 13:25:23 -0900

The man page description of the -I option implies that grep might
output match information for a
binary file if it hasn't "discovered" that the file is binary yet.  It
seems that even with -I Binary file
matches may be reported, as this example on the attached file shows:

$ 'grep' -I -e '.' bca9b83eeb33810a61cca0485f504f98540156
Binary file bca9b83eeb33810a61cca0485f504f98540156 matches

This seems like a bug, because it's clearly produced at a point when
grep has already decided the
file is binary, and scripts can reasonably expect that any matches
that do occur in a
so-far-unknown-to-be-binary file will conform to the output format
specified by other other options (e.g. -n) and feature an actual file
name.

Britton

Attachment: bca9b83eeb33810a61cca0485f504f98540156
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]