You can specify the file by the switch -si
and read from stdin. With a script you can update all the files. But it worked for me only when the type of archive is 7z. Example:
$ 7z l test.7z
7-Zip [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
(...)
Date Time Attr Size Compressed Name
------------------- ----- ------------ ------------ ------------------------
2016-04-20 17:20:08 ....A 2 8 1.txt
2016-04-20 17:20:08 ....A 2 dir1/1.txt
2016-04-20 17:20:08 ....A 2 dir2/1.txt
2016-04-20 17:20:16 D.... 0 0 dir2
2016-04-20 17:20:14 D.... 0 0 dir1
------------------- ----- ------------ ------------ ------------------------
6 8 3 files, 2 folders
$ 7z u test.7z -sidir1/1.txt < 1.txt
$ 7z l test.7z
(...)
Date Time Attr Size Compressed Name
------------------- ----- ------------ ------------ ------------------------
2016-04-20 17:20:08 ....A 2 9 1.txt
2016-04-20 17:20:08 ....A 2 dir2/1.txt
2016-04-20 17:22:08 ..... 4 9 dir1/1.txt
2016-04-20 17:20:16 D.... 0 0 dir2
2016-04-20 17:20:14 D.... 0 0 dir1
------------------- ----- ------------ ------------ ------------------------
8 18 3 files, 2 folders
In the documentation of 7-Zip 9.20 and 15.14:
Note: The current version of 7-Zip support reading of archives from stdin only for xz, lzma, tar, gzip and bzip2 archives.
LZMA is the default compression method for the 7z archive type. I tried -mm=lzma
for zip archive, but it did not work.