[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#63780: Reversing the grep message output type matching binary files
From: |
L A Walsh |
Subject: |
bug#63780: Reversing the grep message output type matching binary files (without the -a option added) changed from stdout to stderr |
Date: |
Thu, 01 Jun 2023 07:50:06 -0700 |
User-agent: |
Thunderbird |
On 2023/05/31 17:38, Paul Eggert wrote:
On 2023-05-30 14:01, gnu@tlinx.org wrote:
Why is finding the desired text in a binary file not a "positive finding"
as it is in a text file?
But it is a positive finding. Grep exits with zero status, which is a
positive result.
There is no perfect solution here. In the old days when 'grep' reported
the situation to standard output, this made stdout confusing and we got
bug reports about it.
I thought binary files were skipped, by default these days (along with
directories). Only if the user's grep includes binary files should they
get positive findings from binary files.
I think that's the deciding factor -- if they want to scan binary files as
well as text, then positive results should be printed to stdout.
If they want to avoid message about the pattern being found in binary
files, they
have the option to not scan binary files.
I.e. the tools for them getting those messages or not were already
present. It seems
wrong to hamstring grep for those not knowing how to use the tool.
- bug#63780: Reversing the grep message output type matching binary files (without the -a option added) changed from stdout to stderr,
L A Walsh <=