Created
February 2, 2017 19:38
-
-
Save MLKrisJohnson/6836085e4add9579d2ab51e0e5370ff6 to your computer and use it in GitHub Desktop.
Bash/zsh function to unzip a set of files to a set of directories
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Unzip a set of files to archive-specific directories | |
# Example: unz *.zip | |
unz() { | |
if [ -z "$1" ]; then | |
echo 'usage: unz FILE...' | |
else | |
for file in "$@"; do | |
/usr/bin/unzip -d "$file.unz" "$file" | |
done | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment