Skip to content

Instantly share code, notes, and snippets.

@kevinsawicki
Created December 28, 2011 21:50
Show Gist options
  • Save kevinsawicki/1529959 to your computer and use it in GitHub Desktop.
Save kevinsawicki/1529959 to your computer and use it in GitHub Desktop.
Prints weekly stock prices for a specific year
#!/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
@kevinsawicki
Copy link
Author

Requires holman's spark script.

Usage

 stork TICKER_SYMBOL YEAR

Examples

Apple price in 2009

stork aapl 2009
▁▁▁▁▁▁▁▁▁▁▁▂▂▂▃▃▃▃▃▃▃▃▄▃▄▄▄▄▄▅▅▅▅▅▅▅▅▆▆▆▆▆▇▆▇▇▇▇▇▇▇▇█

Netflix price in 2011

stork nflx 2011
▄▄▄▅▅▆▆▅▅▅▅▆▆▆▆▆▆▆▆▆▇▇▆▆▆▇█▇▇▇▆▆▅▅▅▅▃▂▂▂▂▂▁▁▁▁▁▁▁▁▁

@holman
Copy link

holman commented Dec 28, 2011

🤘 💰

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment