bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: suggestion for binary search output


From: Walt Pawley
Subject: Re: suggestion for binary search output
Date: Fri, 22 Feb 2008 09:53:51 -0800

On 2/22/08 11:31 AM +0100, Andreas Schwab wrote:

>Walt Pawley <address@hidden> 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.

'Tis certainly true but doesn't help much in some cases. The "line"
that accompanies the byte-offset is usually extraordinarily large.
I've successfully used grep -ab on selected files.

Another approach, perhaps much better than the original suggestion,
would be to have an option to suppress all found text ... leaving
only the output from other options. Or, make --context=NUM treat
NUM=0 as meaning no text.
-- 

Walter M. Pawley <address@hidden>
Wump Research & Company
676 River Bend Road, Roseburg, OR 97470
         541-672-8975




reply via email to

[Prev in Thread] Current Thread [Next in Thread]