summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xextract_zips.sh13
1 files changed, 8 insertions, 5 deletions
diff --git a/extract_zips.sh b/extract_zips.sh
index 749b6f4..e903ee7 100755
--- a/extract_zips.sh
+++ b/extract_zips.sh
@@ -5,11 +5,14 @@ if [ "x$1" = "x-j" ] ; then
shift
fi
+IFS='
+'
+
for i in $* ; do
- dir=$(basename $i .zip)
- mkdir $dir
- cd $dir
- unzip $switch ../$i
+ dir="$(basename $i .zip)"
+ mkdir "$dir"
+ cd "$dir"
+ unzip $switch "../$i"
cd ..
- rm $i
+ rm "$i"
done