Binary file pattern search - Linux

This is a discussion on Binary file pattern search - Linux ; Is there a Unix/Linux application that searches a binary file for a pattern and report the byte offset where this pattern is found and where it ends. The pattern may exist multiple times and I need all offsets. Any ideas ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Binary file pattern search

  1. Binary file pattern search

    Is there a Unix/Linux application that searches a binary file for a
    pattern and report the byte offset where this pattern is found and
    where it ends. The pattern may exist multiple times and I need all
    offsets.

    Any ideas or do I need to write my own program?

    /P

  2. Re: Binary file pattern search

    Have a look at Gnu grep from the text-utils package. Should be on any
    Linux box.

    Does most of what you need.

    Pay particular attention to the --binary and --byte-offset options.

    pdahle@mail.com (Pal Hulden) writes:

    > Is there a Unix/Linux application that searches a binary file for a
    > pattern and report the byte offset where this pattern is found and
    > where it ends. The pattern may exist multiple times and I need all
    > offsets.
    >
    > Any ideas or do I need to write my own program?
    >
    > /P


    --
    -------------------------------------------------------------------------------
    Jerry Sievers 305 854-3001 (home) WWW ECommerce Consultant
    305 321-1144 (mobile http://www.JerrySievers.com/

+ Reply to Thread