zzzzzzz -
When I try this curl outputs some transfer data. Any thoughts:
11:04 AM ~ => curl http://www.google.ca/finance?q=INDEXDJX:.DJI | sed -n '/price-panel style/,/ Close/p' | sed -e :a -e 's/<[^>]*>//g;/</N;//ba'| sed '/^$/d' | sed -e '$!N;s/\n/ /' -e '$!N;s/\n/ /' | head -1 | sed 's/^/DOW: /g'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 53098 0 53098 0 0 184k 0 --:--:-- --:--:-- --:--:-- 216k
DOW: 10,861.09 +89.61 (0.83%)
It's because you don't have the silent tag added to the curl command.
Here is the new command for you:
Code:
curl --silent http://www.google.ca/finance?q=INDEXDJX:.DJI | sed -n '/price-panel style/,/ Close/p' | sed -e :a -e 's/<[^>]*>//g;/</N;//ba'| sed '/^$/d' | sed -e '$!N;s/\n/ /' -e '$!N;s/\n/ /' | head -1 | sed 's/^/DOW: /g'
If you wanted something more powerful, you could try my Stock Ticker Python script: http://code.google.com/p/xtacocorex-geektool-scripts/wiki/StockTickerHowTo