concatenate binary files with length headers in Linux?

421 Views Asked by At

Is there any simple and easy way to concatenate lots of binary files together? Currently, my best bet is iterating over them with python, opening each one, computing the length, creating the header, prepending it and so forth. Is there an easy way to do it with shell?

The results needs to be:

<file0's length>[file0's binary data] <file1's length>[file1's binary data] ...
0

There are 0 best solutions below