I use the command grepin binary files (including the flag -a) and I want to flag a conclusion --binary-offsetor -bnot doing the actual printing, since binary data is useless to me, and leads to the fact that the terminal is behaving strangely (my guess is that the terminal interprets some of binary as terminal commands).
I am currently using the command:
dd ... 2>/dev/null | grep -abFf - file_to_search
for grep for binary string (result dd) infile_to_search
The result is as follows:
offset:[large string of binary characters]
How to print only offsets (without a large string of binary characters)?
source
share