So, I have the following situation:
A code which produces a large (must be zipped) set of outputs as follows:
line00
line01
...
line0N
.
line10
line11
...
line1M
.
...
I generate this content and zip it with:
./my_cmd | gzip -9 > output.gz
What I would like to do is, in pseudo code:
./my_cmd \
| csplit --prefix=foo '/^\.$/+1' {*} \ # <-- this will just create files
| tar -zf ??? \ # <-- don't know how to link files to tar
| gzip -9 > output.tar.gz
Ideally, nothing unzipped ever gets on the hard drive.
In summary: My objective is a set of files split at the delimiter on the hard drive in a zipped state, without intermediate read-write steps.
If I can't do this with tar/gzip/csplit, then maybe something else?