I am wondering if anyone can help me with a shell script to do the following job:
Extract a file from a zip file and put it back in after some editing, e.g. using sed
to do some replacement.
I want to avoid extracting all contents of the zip file into a temporary folder. It could be possible that the zip file contains files with the same name as the one I want to replace with editing. In such case, I want to specify the full path of such file inside the zip file.
Is there any good way to do this task?
Extract a file from a zip file:
unzip file.zip file/you/want/to/extract/the_file.txt
Modify the_file.txt
Put it back:
zip file.zip file/you/want/to/extract/the_file.txt
That should get you started.
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