Thursday, February 9, 2012

How to grep a binary file

Usually grep is used while working with text files. It can also be used with binary files. However a line or line number is probably note very useful in this case.

To get the byte offset you can use:
grep -boa "$PATTERN"

No comments: