At the moment I'm using 7zip for Linux CLI and I need to uncompress a lot of files but I need to remove the .7z files after successful extraction. 7z CLI only contains an option that 7z can erase the source files after successful compression, but no for extraction.
I know that 7zip, when it extracts without error, 7z give to console message "Everything is Ok", so I was thinking if I got this message, I can erase the .7z without a problem and Make sure that the extraction is correct and do not delete the .7z in case of any error in the extraction.
Can anyone help me write a simple script to verify successful extraction and delete .7z file?