Last active
November 27, 2023 16:40
-
-
Save tyrcho/479c18795d997c201e53 to your computer and use it in GitHub Desktop.
recursively unzip jar, war, ear files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#inspired by http://unix.stackexchange.com/questions/4367/extracting-nested-zip-files | |
while [ "`find . -type f -name '*.?ar' | wc -l`" -gt 0 ]; do 1 ↵ | |
find . -type f -name "*.?ar" \ | |
-exec mkdir -p '{}.dir' \; \ | |
-exec echo "unzipping "{}" to "{}".dir" \; \ | |
-exec unzip -o -d '{}.dir' -- '{}' \; \ | |
-exec rm -- '{}' \;; | |
done |
yes you are right, I fixed it !
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, this seems very useful!, but when I tried it didn't work, isn't it missing a . in the find command being run inside the while?