Created
July 19, 2013 19:06
-
-
Save jtrobman/6041581 to your computer and use it in GitHub Desktop.
Bash script that uses the Yahoo Finance API to get stock quotes.
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
#!/bin/bash | |
# http://www.jarloo.com/yahoo_finance/ | |
if [ "$1" == "all" ] | |
then | |
echo $(date +'%Y%m%d %H:%M') $(curl -s 'http://download.finance.yahoo.com/d/quotes.csv?s=aapl&f=l1,c'); | |
echo $(date +'%Y%m%d %H:%M') $(curl -s 'http://download.finance.yahoo.com/d/quotes.csv?s=msft&f=l1,c'); | |
echo $(date +'%Y%m%d %H:%M') $(curl -s 'http://download.finance.yahoo.com/d/quotes.csv?s=yhoo&f=l1,c'); | |
else | |
echo $(date +'%Y%m%d %H:%M') $(curl -s 'http://download.finance.yahoo.com/d/quotes.csv?s='+$1+'&f=l1,c'); | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I do realize that with this script I will never be able to get an Allstate quote...