Last active
June 16, 2016 11:27
-
-
Save blippy/fcb2e74e53d32feee092 to your computer and use it in GitHub Desktop.
Download prices from Yahoo
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
| #!/usr/bin/env bash | |
| # dollar exchange rate | |
| url="http://download.finance.yahoo.com/d/quotes.csv?s=USDGBP=X&f=nl1d1t1" | |
| curl -s -L $url > usd.csv & | |
| # download regular tickers | |
| PRE="http://download.finance.yahoo.com/d/quotes.csv?s=" | |
| POST="&f=sl1c1p2&e=.csv" | |
| while read SYM | |
| do | |
| URL="$PRE$SYM$POST" | |
| curl $URL & | |
| done | |
| wait |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See also mca-yfetch.sh, which was part of the mcacc project.