I have a bunch of zip files I want to unzip in Linux into their own directory. For example:
a1.zip a2.zip b1.zip b2.zip
would be unzipped into:
a1 a2 b1 b2
respectively. Is there any easy way to do this?
I have a bunch of zip files I want to unzip in Linux into their own directory. For example:
a1.zip a2.zip b1.zip b2.zip
would be unzipped into:
a1 a2 b1 b2
respectively. Is there any easy way to do this?
for x in $(ls *.zip); do
dir=${x%%.zip}
mkdir $dir
unzip -d $dir $x
done
for zipfile in *.zip; do
exdir="${zipfile%.zip}"
mkdir "$exdir"
unzip -d "$exdir" "$zipfile"
done