Created
January 3, 2014 21:04
-
-
Save theWill/8246579 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
#search for all zip files and unzip them into a subfolder with the same name as the zip | |
zips=$(find . -name \*.zip -type f;) | |
echo $zips | |
for i in $zips | |
do | |
echo "--- "$i | |
#remove the .zip from the name, each i | |
m=$(echo $i | awk -F"." '{print substr($2,2)}') | |
echo $m | |
mkdir $m | |
unzip $i -d $m | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment