Skip to content

Instantly share code, notes, and snippets.

@bjjay
Created May 10, 2012 09:21
unzip files
#!/bin/bash
for item in `ls -d */*.zip`
do
sub=`echo $item | cut -d / -f 1`
unzip $sub/*.zip -d $sub
unrar e $sub/*.rar $sub
rm -f $sub/*.zip $sub/*.rar
done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment