7

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
no comments (yet)
sorted by: hot top new old
there doesn't seem to be anything here
this post was submitted on 27 Apr 2024
7 points (88.9% liked)

Programming

28322 readers
762 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 3 years ago
MODERATORS