Skip to content

Instantly share code, notes, and snippets.

@jarun
Last active March 18, 2017 17:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jarun/88fea6c86b14802c93db13d8831bfdf6 to your computer and use it in GitHub Desktop.
Save jarun/88fea6c86b14802c93db13d8831bfdf6 to your computer and use it in GitHub Desktop.
Stock price

Covert currency:

#!/bin/bash

wget -qO- "http://www.google.com/finance/converter?a=$1&from=$2&to=$3" |  sed '/res/!d;s/<[^>]*>//g';

Get stock price:

curl -s 'http://download.finance.yahoo.com/d/quotes.csv?s=avgo&f=l1'

Get current price with change:

curl -s 'http://download.finance.yahoo.com/d/quotes.csv?s=avgo&f=l1c1'

Get multiple stock quotes:

curl -s 'http://download.finance.yahoo.com/d/quotes.csv?s=avgo,aapl&f=l1'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment