Andreas Schwab wrote:
Walt Pawley writes:
I've had several occasions to want to extract the byte-offset
of a text string in a binary file. The various versions of grep
I've used won't provide that unless the file is treated as text
- printing a line indicating that the string is present.

You can use -a to force treatment as non-binary.

I read the above as "...and I don't want to use -a" ("unless the file is treated as text" to me implies that he knows about -a, but isn't satisfied with that solution). Maybe something like "Binary file foo matches at offset 67" is what he would like?

Walt?

--
Matthew
People say I'm going insane. I say, "what do you mean, 'going'?".


Reply via email to