Created
December 28, 2011 21:50
-
-
Save kevinsawicki/1529959 to your computer and use it in GitHub Desktop.
Prints weekly stock prices for a specific year
This file contains 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 | |
curl -s "http://www.google.com/finance/historical?q=$1&startdate=jan+1&2c+$2&enddate=dec+31%2c+$2&output=csv&histperiod=weekly" \ | |
| sed -e '1d' \ | |
| tac \ | |
| cut -d, -f5 \ | |
| spark |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Requires holman's spark script.
Usage
Examples
Apple price in 2009
Netflix price in 2011