GNU bug report logs -
#63780
Reversing the grep message output type matching binary files (without the -a option added) changed from stdout to stderr
Previous Next
Reported by: "2773414454" <2773414454 <at> qq.com>
Date: Mon, 29 May 2023 04:56:02 UTC
Severity: normal
Tags: notabug
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
>> So my original intention is to ask the community whether there is a better way to modify the grep3.7 source code.
I doubt it makes sense to change (revert, in this case) grep's interface for all other users,
for the benefit of one user who has limited ways of adapting to the current interface.
Can you code a wrapper for grep, whether in bash/zsh shell or in C or similar, that is also
called "grep" and appears on the PATH before the "real" grep? This wrapper could invoke
the "real" grep, fixup the one issue of concern here, that the "binary file matches" error
message might come out on the "wrong" (for your use case) file descriptor, and leave all
the other grep work to whatever the currently installed "real" grep does.
--
Paul Jackson
pj <at> usa.net
This bug report was last modified 1 year and 357 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.