- cross-posted to:
- [email protected]
- cross-posted to:
- [email protected]
cross-posted from: https://beehaw.org/post/13362507
It uses 7z to extract files from archives. By also utilizing GNU Parallel, multiple files can be processed at the same time.
The purpose is to streamline option handling and usability of both programs into a unified command line interface, by only incorporating functionality which I need. 7z’s option and argument handling is a bit confusing and does things in unique and unfamiliar ways. On the other side, we have Parallel, which is extremely complex and has ton of functionality; also confusing. So I picked up my favorite options and bundled them into a manageable script.
Name of the script is inspired by unwrap() functionality from Rust programming language. It unpacks certain type of variables to make use what is inside of it.
7z
(probably in packagep7zip
) andparallel
are required and need to be present.
git clone https://github.com/thingsiplay/unwrap cd unwrap chmod +x unwrap
usage:
unwrap *.zip unwrap -f -i '*.txt' -o . *.zip