Hai’s Blog

May 6, 2009

View Stock Price Using Command Line

Filed under: Finance, Tips & Tricks, Unix — Hai @ 4:21 pm

I live on command line all day, so it is convenience to perform many tasks using the command line. One of those is to check stock price:

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

The above command check for the last price (with some delay) of Cisco Systems. If you want to check the price for other tickers, replace ‘csco’ with your ticker symbol. You can query more than one symbols by separate them with commas, but do not leave any space in between.

The f=l1 defines the formatting for the returned information. To find more about formatting, visit this page

Please note this trick requires curl so install it before you try.

1 Comment »

  1. Often we’re forgetting how powerful are the simple tools, to be found in any distro. ;)

    Comment by Zbigniew — June 2, 2009 @ 11:49 pm


RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.