|
@ -4,22 +4,6 @@ |
|
|
# http://www.ecb.int/stats/exchange/eurofxref/html/index.en.html |
|
|
# http://www.ecb.int/stats/exchange/eurofxref/html/index.en.html |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# download and unzip data if not available |
|
|
|
|
|
# code only für Unix-Shells sh, bash, ... |
|
|
|
|
|
# remove or comment out these lines in Windows/MacOS. an load fram source manualy |
|
|
|
|
|
# |
|
|
|
|
|
# sh: remove file eurofxref-hist.csv if last zip-file is not from today |
|
|
|
|
|
! [ -f upload-from-$(date '+%Y-%m-%d').zip ] || \ |
|
|
|
|
|
remove eurofxref-hist.csv \ |
|
|
|
|
|
-O upload-from-$(date '+%Y-%m-%d').zip |
|
|
|
|
|
# sh: get new zip-file from EZB if last zip-file is not from today |
|
|
|
|
|
! [ -f upload-from-$(date '+%Y-%m-%d').zip ] || \ |
|
|
|
|
|
wget http://www.ecb.int/stats/eurofxref/eurofxref-hist.zip \ |
|
|
|
|
|
-O upload-from-$(date '+%Y-%m-%d').zip |
|
|
|
|
|
# sh: extract zip-file if nesesarry |
|
|
|
|
|
! unzip -o upload-from-$(date '+%Y-%m-%d').zip |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Start und Ende ermitteln (z.Zt. nur für Consolenausagabe) |
|
|
# Start und Ende ermitteln (z.Zt. nur für Consolenausagabe) |
|
|
stats 'eurofxref-hist.csv' every ::1 u (strptime("%Y-%m-%d",strcol(1))) nooutput |
|
|
stats 'eurofxref-hist.csv' every ::1 u (strptime("%Y-%m-%d",strcol(1))) nooutput |
|
|
print ' -----Stats-(Timestamp)----' |
|
|
print ' -----Stats-(Timestamp)----' |
|
|