Utility grep

James <[email protected]>
Newsgroups gmane.comp.gnu.utils.bugs
Message-ID <[email protected]>
Hi,

I  was looking for a tool that could find a string (pattern) in a file
and return the startposition of each occurence.

I tested GREP with the -b option

It  works fine if the file is a text file, but it does not returns the
binary  position  of the searchpattern, but the binary position of the
beginning of the LINE where it is part of ...

Furtermore,  if  the  file  is an EXE, so a real binary file and not a
text file with lines, this does not work.

If  I  use the parameter "-c", I get the correct number of occurences.
But  without  this  parameter,  it just says "Binary file filename.exe
matches"

Is  it  not  possible  to get the startposition of each occurence of a
pattern in a non text file ?


James
mailto:[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.