Created
June 11, 2013 15:16
-
-
Save seumasmorrison/5757713 to your computer and use it in GitHub Desktop.
For iterating over zipped months of buoy data and extracting out the history files.
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
unzip_his() { for line in $(unzip -l $1 \ | |
| grep his \ | |
| awk '{print $4}'); | |
do | |
echo $1 $line | |
unzip -p $1 $line > $(echo $line | sed -re 's/^.+\///'); | |
done | |
} | |
for zip in "$@" | |
do | |
unzip_his "$zip" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment