Subject: Re: Suggestion: keep binary data out of /etc
To: Bill Studenmund <skippy@macro.Stanford.EDU>
From: Soren S. Jorvang <email@example.com>
Date: 02/09/1999 22:51:18
On Tue, Feb 09, 1999 at 09:56:10AM -0800, Bill Studenmund wrote:
> I'm curius, how does that work with binary files? I mean what info do you
> get out of it?
> grep's ideas of what is a "line" is weird for a binary file. So I'm unsure
I think this is makes it reasonable to change the current behaviour.
'Lines' just don't make sense for binary files (looking for NULs is
reasonable hack to detect binary files).
Perhaps just printing the matching string by default to avoid printing
'Binary file found' / spewing binary garbage could work.
$ grep -o NetBSD /netbsd
(Or possibly print isprint()'able text around it too, but then
the decision becomes less simple, and there is always -a..)