I have some hex dumps that look like this:
0x000eb3a8 0005a5a8 0005a5b0 ........
0x000eb3b0 000e8918 0005a7b8 ........
0x000eb3b8 00056018 00000001 ..`.....
0x000eb3c0 00000000 000b8450 .......P
0x000eb3c8 000b83b0 00000007 ........
0x000eb3d0 000b8378 000b8358 ...x...X
0x000eb3d8 000cef70 000c95f8 ...p....
I want to parse the two columns in the middle, read them byte by byte (obviously, two characters represent one byte in hex notation) and write each byte into a binary file. I tried with awk
, but couldn't find a way to write binary output. Can somebody help me? Any other tool or scripting language (perl, python, sed, zsh, ...) would also be accepted.
Thanks a lot!