I am having some difficulty finding the number of hex characters in a file. For example:
grep -o \x02 file | wc -l
0
There should be about 3M matches here, but it doesn't seem like the \x02
character is being recognized here. For example (in python):
>>> s=open('file').read()
>>> s.count('\x02')
2932267