In linux bash, how can we concatenate files with padding on 4-byte boundary. I have 3 files a.txt, b.txt, c.txt, and want to concatenate them to create d.txt, each element file is started on 4-byte boundary.
a.txt: 1 byte
b.txt: 2 bytes
c.txt: 4 bytes
d.txt should be
0-3: a.txt
4-7: b.txt
8-11: c.txt
Any suggestions are appreciated.
Thanks and Best Regards,
Dien
1 Answer