|
From: | GNU bug Tracking System |
Subject: | [debbugs-tracker] bug#33898: closed (grep reports binary file matches even with -I option) |
Date: | Mon, 21 Jan 2019 03:45:02 +0000 |
Your message dated Sun, 20 Jan 2019 19:43:55 -0800 with message-id <address@hidden> and subject line grep reports binary file matches even with -I option has caused the debbugs.gnu.org bug report #33898, regarding grep reports binary file matches even with -I option to be marked as done. (If you believe you have received this mail in error, please contact address@hidden) -- 33898: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=33898 GNU Bug Tracking System Contact address@hidden with problems
--- Begin Message ---Subject: 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. Brittonbca9b83eeb33810a61cca0485f504f98540156
Description: Binary data
--- End Message ---
--- Begin Message ---Subject: grep reports binary file matches even with -I option Date: Sun, 20 Jan 2019 19:43:55 -0800 Thanks for reporting the problem. This is a bug in grep's man page, which wasn't updated back in 2016 when I updated the main documentation. (The man page is lower priority and is sometimes neglected.) I installed the attached patch to fix it. User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 0001-doc-binary-files-update-in-man-page.patch
Description: Text Data
--- End Message ---
[Prev in Thread] | Current Thread | [Next in Thread] |