Here is the situation: I have to find in the output from an
hexdump the bytes between a string A and a string B. The structure of the hexdump is something like:
-random bytes -A + useful bytes + B -random bytes -A + useful bytes + B -random bytes
And now, the questions: - Is it possible to grep "from A to B"? I haven't seen anything like that in the man page or in the internet. I know i can do it manually, but I need to script it. - Is it possible to show the hexdump output without the line numbers? It seems very reasonable, but I have no found the way to do it.
Edit: I'm trying to recover 2 deleted JPEG images from a loopback device, so I can't show all the output (it's extremely long), but here's a piece of it:
0010400 ff d8 ff e0 00 10 4a 46 49 46 00 01 01 00 00 01 0010410 00 01 00 00 ff fe 00 3c 43 52 45 41 54 4f 52 3a [...] 0030f50 3e e9 fb a4 54 37 70 7f cb 55 03 fd af f1 a2 32 0030f60 e8 26 8f ff d9 00 00 00 00 00 00 00 00 00 00 00
the standard says that the JPEG files start with 0xff 0xd8 and finish with 0xff 0xd9, so I want to get all the information between that 2 strings (I think that should work, but i haven't tested it yet)