WARNING: This server is unstable and will be retired in the next days. If you want to keep this forum available, please request immediately a migration on the Nabble Support forum. Forums that don't receive any migration request will be deleted forever.

 « Return to Thread: Utility grep

Utility grep

by James-384 :: Rate this Message:

| View in Thread

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:jamesvdb@...


 « Return to Thread: Utility grep