Created
September 11, 2019 13:53
-
-
Save Chandru-B/07a37788738d82e67d9b72bef21c91fb to your computer and use it in GitHub Desktop.
bash unzip filename split string
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
#!/usr/bin/env bash | |
for f in *.zip; do | |
echo $f | |
# echo $filedate | |
filedate=${f##*_} | |
filedate="$(cut -d'.' -f1 <<<"$filedate")" | |
echo $filedate | |
unzip $f -d $filedate | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment