bgrep icon indicating copy to clipboard operation
bgrep copied to clipboard

Add argument to invert query endianess

Open cirosantilli opened this issue 7 years ago • 1 comments

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.

cirosantilli avatar Jun 26 '17 14:06 cirosantilli

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 ", which adds "number" to the search string, and be something like {B,H,I,Q}, possible with a prefix to indicate endianness. We could then support multiple search strings (which are concatenated), so one could search for

bgrep -iI 0x12345 -iI 0x5678 

but also

bgrep -iI 0x12345 08070605

etc.

tmbinc avatar Feb 21 '21 09:02 tmbinc