On 2023/06/01 14:18, Paul Eggert wrote:
On 6/1/23 07:50, L A Walsh wrote:
I thought binary files were skipped, by default

They're not. The '--binary-files=without-match' option enables that behavior. With that option, this issue doesn't come up.

if they want to scan binary files as
well as text, then positive results should be printed to stdout

Not if that would screw up the screen. This is a real problem with arbitrary binary data, with real security implications.

If the output is displayed through a util like 'less', such binary data
is automatically filtered.


Perhaps it would be a good idea for grep to provide such filtering
(displaying <00><AH>, or such) for non-ascii data?

I have a command to restore my tty settings to the value they
were when I logged on.

Nevertheless, displaying <filename>: matches, without the text doesn't
seem to pose any security risks.



Reply via email to