From 8c62cfcff0c0727491aaa54e5288bf315716e7e8 Mon Sep 17 00:00:00 2001 From: Ian C Date: Fri, 8 Sep 2023 19:56:34 +0100 Subject: Added -j switch to flatten archive --- extract_zips.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/extract_zips.sh b/extract_zips.sh index bf76d10..749b6f4 100755 --- a/extract_zips.sh +++ b/extract_zips.sh @@ -1,10 +1,15 @@ #!/bin/bash +if [ "x$1" = "x-j" ] ; then + switch=-j + shift +fi + for i in $* ; do dir=$(basename $i .zip) mkdir $dir cd $dir - unzip ../$i + unzip $switch ../$i cd .. rm $i done -- cgit v1.2.3