I want to compress the contents of stdin using zip
, for instance:
echo 'foo bar' | zip > file.zip
This works ok, but when unzipping, the uncompressed file name is -
I was wondering how I could specify a file name for stdin?
What you can do is pipe the file in normally, then rename it in the zip
echo 'foo bar' | zip > file.zip
printf "@ -\n@=filename.txt\n" | zipnote -w file.zip