Is it possible to use something like:
command.exe | zip >> archive.zip
command2.exe | zip >> archive.zip
…and end up with two named files inside one zip archive.
This way, if at all possible, would be neater than having temp files.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Create two named pipes in a new dir (with mkfifo), pipe the output of the commands to these two pipes and then zip the dir.
EDIT: Added the FI flag to zip, which does make this possible. The only caveat is that you need zip 3.0 for this to work. Tar:ing FIFO:s is not implemented (according to tar devs) because you need the file size in advance in order to write it to the TAR header.