Fitting Some Files Through A Stdout-Shaped Hole

3 points by rtpg


jmillikin

The next stage of this idea's evolution is to use length prefixes instead of delimiters:

00000002
000000F0
<240 bytes of file 1 of 2>
00022000
<139264 bytes of file 2 of 2>

Then you might decide to put the filenames into the origin rather than hardcoding them into the destination script:

00000002
0B
widgets.csv
000000F0
<240 bytes of widgets.csv>
0C
thingies.csv
00022000
<139264 bytes of thingies.csv>

Then your team's resident grey-haired curmudgeon laughs at you and sends you a link to the manpage for tar (or cpio if your logs system requires printable ASCII), because Unix administrators have a mysterious love for data transmission via stdio and they've had standard formats for that since the '80s.