bash un zip all compressed files in a directory

this seems to work for now:
for file in *zip; do extdir=`basename "$file" .zip`; unzip -d "$extdir" "$file"; done
it will extract all the .zip files into a new directory based on the file’s name.

ex:

for emacs goodies1.zip

it will create a directory called “emacs goodies1” and place all the files there.

them proceed to the next .zip file

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s