Skip to content

Instantly share code, notes, and snippets.

@theWill
Created January 3, 2014 21:04
Show Gist options
  • Save theWill/8246579 to your computer and use it in GitHub Desktop.
Save theWill/8246579 to your computer and use it in GitHub Desktop.
#!/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