7

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"

arcull
  • 281
  • 1
  • 4
  • 11

1 Answers1

12

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.

arcull
  • 281
  • 1
  • 4
  • 11