Sensex Figure using a Linux Command

This one command will fetch and display the latest sensex figure in Linux. This command basically downloads a page, locates a specific line, and then extract just the necessary portion from it. I am sure you could find other uses for this method.


curl -s "http://money.rediff.com/money/jsp/markets_home.jsp" |grep ''|head -n1|perl -pe 's/^.+\">([\d\,\.]+)<\/TD>.+$/\1/i;'
Author: Binny V A
A philosopher programmer who specializes in backend development and stoicism.

Leave a Reply

Your email address will not be published. Required fields are marked *