Created
February 4, 2018 14:51
-
-
Save Alexhha/a3195451d50cab8720f19ee2416d6a1d to your computer and use it in GitHub Desktop.
This file contains 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 | |
PATH_PREFIX=/opt/upload/10k | |
zipinfo -1 100k.zip | grep -v /$ | head -10000 | while read curr_file | |
do | |
curr_dir=$(dirname ${curr_file}) | |
if [[ ! -d ${PATH_PREFIX}/${curr_dir} ]]; then | |
mkdir -p ${PATH_PREFIX}/${curr_dir} | |
fi | |
unzip -j 100k.zip "${curr_file}" -d "${PATH_PREFIX}/${curr_dir}" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment