I have a binary stream at standard input, it is in a fixed size format, a continuous stream of packets, each packet has a header with a length of X and a body with a length of Y.
So, if X = 2 Y = 6, then this is something like 00abcdef01ghijkl02mnopqr03stuvwx , but it is binary, and both headers and data can contain any "characters" (including "\ 0" and a new line), this example is read only .
I want to get rid of the header data so that the result looks like this: abcdefghijklmnopqrstuvwx .
Are there any commands in the unix toolchain that allow me to do this? And are there any tools for processing binary data? The only tool I could think of is od / hexdump , but how do you convert the result back to binary?
source share