bgrep
bgrep copied to clipboard
Add argument to invert query endianess
E.g.:
bgrep -i 4 0102030405060708
would invert endianess and be equivalent to:
bgrep 00403020108070605
The magic case -i 0
could invert the entire string to: 0807060504030201
.
I think searching for numbers is an intriguing enough use-case to justify special treatment, however such an "-i" option has corner cases (non-multiple search string length) that makes the behavior a bit non-obvious.
I wonder if we should instead support something like "-i
bgrep -iI 0x12345 -iI 0x5678
but also
bgrep -iI 0x12345 08070605
etc.