Skip to content

Instantly share code, notes, and snippets.

@alexbain alexbain/extract.sh
Last active Dec 30, 2015

Embed
What would you like to do?
Extract all .7z files in a directory into subdirectories that match the file name
#!/bin/bash
for i in *.7z; do
subdirectory_name=$(echo $i | sed 's/.7z//');
7z x "$i" -o"$subdirectory_name"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.