Subject: Re: Suggestion: keep binary data out of /etc
To: Bill Studenmund <skippy@macro.Stanford.EDU>
From: Shyeah right. What am I gonna do with a gun rack? <>
List: current-users
Date: 02/10/1999 14:20:11
As I see it, we have a choice of the following:

- Give grep 'smarts' to figure out a binary file.

- Give grep an option to treat a file as binary.

- Have 'binary' mode translate into 'treat all non-printing charaacters
  as newlines.'

- Patch strings(!) to output the file name before each line (optionally)
  for multiple files (as grep does currently) and run that output through

There are probably other workarounds, but the above are what come to
mind, and the last one popped in as I was typing.

...and, realistically, it's the one that seems to make the most sense,
considering that our strings is not so drain-bamaged as to be restricted
to ccs-generated files.

Of course, that could be done via:

for file in $filelist; do {
    strings $file | sed "s/^/$file: /g";
} done;

and pipe THAT through grep, so never mind the comment about it making
the most sense.

USL, Microsoft, IBM:  The knights who say "NIH"!