How to Get Stock Quote on Linux using Google ,Curl, Grep, Awk
If you are a Stock Market Addict and a Techie; normally working on Linux(es); this post will interest you as you still can get quote of your stock on your Linux prompt. Consider, we have Google Finance url for Tata Consultancy Services Stock: http://www.google.com/finance?q=NSE:TCS So, how do you get above stock price while you’re on Linux / Unix server? It’s a sinlge line command and you get your stock’s current price. 🙂 curl –silent -X Get “http://www.google.com/finance?q=NSE:TCS” > /tmp/ChangeIsInevitable && cat /tmp/ChangeIsInevitable | grep -m1 -E ‘span id=”ref_’ | awk -F “>” ‘{print $2}’ | awk -F “<” ‘{print $1}’...