Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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

This comment has been minimized.

Copy link
Owner Author

@kevinsawicki kevinsawicki commented Dec 28, 2011

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

This comment has been minimized.

Copy link

@holman holman commented Dec 28, 2011

🤘 💰

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