From 343958013e82a124e5a2d8ab9ba1644d3ae04f12 Mon Sep 17 00:00:00 2001 From: Michiel Scholten Date: Mon, 25 Mar 2019 21:26:24 +0100 Subject: [PATCH] unzip all zip files in current directory to a dir with their filename --- bin/unzip_all | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 bin/unzip_all diff --git a/bin/unzip_all b/bin/unzip_all new file mode 100755 index 0000000..5110961 --- /dev/null +++ b/bin/unzip_all @@ -0,0 +1,11 @@ +#!/bin/bash + +find . -type f -name '*.zip' -exec sh -c ' + for file do + echo "$file" + zipdir=$(basename "$file" .zip) + #echo "$zipdir $file" + unzip -d "$zipdir" "$file" + read line