Skip to content

Commit c1bdd7c

Browse files
committed
Working on #353
1 parent ddaade4 commit c1bdd7c

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
set -eu
3+
yearmonths="$@"
4+
first=true
5+
for yearmonth in $yearmonths
6+
do
7+
$first || sleep 2
8+
first=false
9+
date=$(date --date="$yearmonth-01 +1 month -1 day" +%Y-%m-%d)
10+
curl --fail "https://www.imf.org/external/np/fin/data/rms_mth.aspx?SelectDate=${date}&reportType=CVSDR&tsvflag=Y" \
11+
--output $yearmonth.tsv \
12+
|| break
13+
done

0 commit comments

Comments
 (0)