Last active
July 18, 2019 06:32
-
-
Save sksat/740630a6138090f0ae65d4b9b9e1f215 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 | |
# sample url: http://database.rish.kyoto-u.ac.jp/arch/jmadata/data/gpv/original/2017/08/10/Z__C_RJTD_20170810060000_MSM_GPV_Rjp_L-pall_FH00-15_grib2.bin | |
url_base="http://database.rish.kyoto-u.ac.jp/arch/jmadata/data/gpv/original/" | |
fname_1="Z__C_RJTD_" | |
fname_2=_"MSM_GPV_Rjp_L-pall_FH00-15_grib2.bin" | |
year=2017 | |
month=8 | |
hour=6 | |
min=0 | |
sec=0 | |
for ((day=10; $day <= 20; day++)); do | |
date=$(printf "%d%02d%02d%02d%02d%02d" $year $month $day $hour $min $sec) | |
fname=$fname_1$date$fname_2 | |
url=$url_base$(printf "%d/%02d/%02d/" $year $month $day)$fname | |
echo $url | |
wget $url | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment