Created
December 20, 2016 19:19
-
-
Save mvexel/e9588b4d9f6ff15891c7d31c3898e3d1 to your computer and use it in GitHub Desktop.
stock_quote_function.sh
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
# Get stock quote from command line | |
# Call with `sq yhoo` | |
# By default only last trade price shown | |
# add extra info in optional second parameter | |
# for available data see http://vikku.info/codetrash/Yahoo_Finance_Stock_Quote_API | |
# like so: `sq yhoo c1` will give you % change for the day | |
function sq() { | |
curl -s "http://download.finance.yahoo.com/d/quotes.csv?s=$1&f=l1$2" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment