We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ddaade4 commit c1bdd7cCopy full SHA for c1bdd7c
moneta-convert/moneta-convert-imf/src/etc/download.sh
@@ -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