38
submitted 6 months ago by thingsiplay@beehaw.org to c/linux@lemmy.ml

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 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
you are viewing a single comment's thread
view the rest of the comments
[-] thingsiplay@beehaw.org 5 points 6 months ago* (last edited 6 months ago)

Wow thank you guys (Edit: and gals off course if anyone is). ❤️ also to @acockworkorange@mander.xyz

this post was submitted on 24 Apr 2024
38 points (93.2% liked)

Linux

47996 readers
1050 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS