osx - Mac Terminal Curl for textfile -
i trying download csv file local webserver (the webserver runs on signal conditioning instrument) with:
curl -o http://10.0.0.139/crv01.csv
the output curl weird symbols. if put same url in safari csv file correctly depicted. there encoding problem curl?
i tried verbose option gives:
gunthers-macbook-pro:documents guenther$ curl -v -o http://10.0.0.141/crv01.csv * connect() 10.0.0.141 port 80 (#0) * trying 10.0.0.141... % total % received % xferd average speed time time time current dload upload total spent left speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* connected * connected 10.0.0.141 (10.0.0.141) port 80 (#0) > /crv01.csv http/1.1 > user-agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 openssl/0.9.8x zlib/1.2.5 > host: 10.0.0.141 > accept: */* > < http/1.1 200 ok < date: mon aug 26 21:03:12 2013 < server: vega-http-server < cache-control: public, max-age=3600 < content-type: text/plain < connection: close < content-encoding: gzip < content-length: 226 < { [data not shown] 100 226 100 226 0 0 1883 0 --:--:-- --:--:-- --:--:-- 1965 * closing connection #0 gunthers-macbook-pro:documents guenther$ vi crv01.csv ^_<8b>^h^@^@^@^@^@^@^c}<92>Á <83>0^l<86>ï<82>ï xÙ^n+i;kko²<95>!l^n6õ-ÆÞÿ¶zФ¬4Ç~$ÿ<9f>?_~^yÞÃs¬p@yÔ<97>ùµø Ðmýí4~e<85>áñÚoÞmÃû¥¿Ïþð9<96><85>l^d^x!^a<95>cÛ)Õ¡ur´^rbetb<96>b<96>j¢^x^f^g<87>lwª^?ªwwÀt·^f<99>n<82>&ty/Ó]m®^x=g]5d^s½:kÛ,5;Õv^]^]®À\Ù^\eÈrÌrÊ*¡<8b><94>u<8a>rv)jy¥(e¥^m<84><8a>öeÊ*e^mmd tÜk<89>¶^aÆ÷eÿy<9b>ü^c»üß{e^c^@^@
source code of webpage (google chrome) plain cdv file. csv file create http://www.vega.com/en/signal-conditioning-instrument-vegamet391.htm
the --text-ascii option did not help!
it seems page sent compressed (see header "content-encoding: gzip") though curl didn't ask it. if ask it, curl decompress automatically when receiving it. try:
curl --compressed -o http://10.0.0.139/crv01.csv
Comments
Post a Comment