in reply to Re^2: How to concatenate binary files
in thread How to concatenate binary files

That's a very good and interesting question. I suppose the reason why I did it the way above is because it's a perl interpretation of the unzipsfx docs (check the man page on unzipsfx - the EXAMPLES section near the bottom).

A quick test shows:

$ zip -A mysfx /usr/bin/unzipsfx x adding: usr/bin/unzipsfx (deflated 52%) adding: x (deflated 12%) $ file mysfx mysfx: Zip archive data, at least v2.0 to extract
which is far from what we want. The output is still a zip file. But, if we do the shell version of the perl code above, we get:
$ cat /usr/bin/unzipsfx mysfx > mysfx_exe $ zip -A mysfx_exe mysfx_exe: adjusting offsets for a preamble of 47552 bytes $ file mysfx_exe mysfx_exe: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), f +or GNU/Linux 2.2.5, dynamically linked (uses shared libs), stripped
I hope that helps.