Last active
December 20, 2015 07:59
-
-
Save blech/6097006 to your computer and use it in GitHub Desktop.
Extract an station's history from GSOD
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 | |
# TODO the station code should be an argument | |
# also I just ran this as one line so it might not even work as a script | |
# GSOD: http://www.ncdc.noaa.gov/cgi-bin/res40.pl?page=gsod.html | |
for i in gsod_199*.tar; | |
do y=`echo $i | awk -F '_' '{print $2}' | awk -F '.' '{print $1}'`; | |
echo working on $i $y; | |
tar -xvf $i 037720-99999-$y.op.gz; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment