- cross-posted to:
- [email protected]
- [email protected]
- cross-posted to:
- [email protected]
- [email protected]
Bash script for Linux
I have been working on this script for the last couple of days. It’s not earth shattering, but sometimes these little things make life easier; so mine. I am at a point now, where the script is basically where I want to be. Maybe someone else finds it useful too.
It uses 7z to extract files from archives. By also utilizing GNU Parallel, multiple archives can be processed at the same time.
Purpose is to streamline option handling and usability of both programs into an unified interface. Sensible defaults and only functionality I care about are incorporated. 7z option and argument handling is confusing, doing things in unconventional ways. On the other side, we have Parallel, which is complicated and has ton of features; also confusing. So I picked up my favorite options and bundled them into a manageable script.
Name of the script is inspired by unwrap() operation from Rust programming language. It’s purpose is to provide the content of certain type of variables, by looking inside of it and taking it out.
7z
(probably in package p7zip
) and parallel
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