I'm writing a bash script which should extract content of one 7z file and compress that extracted content to a new 7z file. The command I've tried is
7z x -o/tmp/ "/home/file1.7z" | 7z a -t7z "/home/file2.7z"
ok, found out how to do it: 7z x "/home/file1.7z" -so | 7z a -si "/home/file2.7z"
"so" switch is needed, meaning that instead of extracting content to folder it should extract to stdout, same analogy goes for "si" switch.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With