Created
October 7, 2016 19:07
-
-
Save mathieu-aubin/5fd2748463f4ace7e3af06d0b188fe5a to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
# To run as a script, leave as is. Save to file and chmod +x, then execute in the dir where zipfiles are. | |
# To use as a function, remove line 1, uncomment line 4 and 12 and call using unzip-all in the dir where zipfiles are. | |
#unzip-all() { | |
local dir='.'; | |
[[ ! -z "${1// }" ]] && dir=$1; | |
for z in *.zip; do | |
q=$(echo $z | cut -f 1 -d '.'); | |
unzip $z -d $dir/$q; | |
done; | |
#} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment