Using cURL command, how do we fetch stock data which comes back *WITHOUT comm - Printable Version +- Curl Global Community (https://communities.curl.com) +-- Forum: Discussions (https://communities.curl.com/forumdisplay.php?fid=1) +--- Forum: General Curl questions (https://communities.curl.com/forumdisplay.php?fid=2) +--- Thread: Using cURL command, how do we fetch stock data which comes back *WITHOUT comm (/showthread.php?tid=1195) |
Using cURL command, how do we fetch stock data which comes back *WITHOUT comm - Scotland Warrior - 01-15-2015 What can I add to the below script so that it fetches the stock data and brings it back WITHOUT any commas and spaces? For example GOOG Outstanding shares is 675,000,000. I desire the output of 675000000 for my txt file. (no spaces or commas or punctuation). I need decimal functionality however for share prices though). This txt file data is then inputted into Excel and needs to be delimited so the values need spacing as well. cd desktop/quoteUpdate while true do curl -s http://download.finance.yahoo.com/d/quotes.csv?s=avxl,goog,aapl&f=sl1c6sj2ss6sf6 \ sed 's/"[A-Z][^"]*",/ & /g' \ | awk -- '{ gsub("\"", "", $2); gsub(",", "", $4); gsub(",", "", $8); print $1 $2 $4 "," $6 $8 echo UPDATED: date sleep 10 RE: Using cURL command, how do we fetch stock data which comes back *WITHOUT comm - dyoshida - 01-16-2015 This community is for the CURL. http://en.wikipedia.org/wiki/Curl_(programming_language) So may not get the answer for cURL questions. |