diff options
author | Ian C <ianc@noddybox.co.uk> | 2024-10-14 13:25:34 +0100 |
---|---|---|
committer | Ian C <ianc@noddybox.co.uk> | 2024-10-14 13:25:34 +0100 |
commit | d1718c3e581271de9014ab2f2b41e69c9899f4ac (patch) | |
tree | 4e7aedac05cd12149d768a005b1ca5e76e0f8060 /extract_zips.sh | |
parent | 1fc3fa1c3a68a8ee8439c2fec00cbb4c551ede0a (diff) | |
parent | 83b338f37d60e63a27abd19e744e87d86eae8dfb (diff) |
Diffstat (limited to 'extract_zips.sh')
-rwxr-xr-x | extract_zips.sh | 13 |
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 |