cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Missing Format Variable

From: Doug McNutt <douglist_at_macnauchtan.com>
Date: Tue, 6 Oct 2009 17:57:14 -0600

At 23:35 +0000 10/6/09, Jinye Jeff Li wrote:
I am a new user of Curl. When I try download some data from the yahoo website, I got an "Missing Format Variable" error. I hope someone can kindly point what is wrong. Here is the command I used:
 
curl <http://download.finance.yahoo.com/d/quotes.csv?s=@%5EIXIC&f=sl1d1t1c1ohgv&e=.csv&h=0>http://download.finance.yahoo.com/d/quotes.csv?s=@%5EIXIC&f=sl1d1t1c1ohgv&e=.csv&h=0.
 
Here is the return:
 
Missing Format Variable.
'f' is not recognized as an internal or external command,
operable program or batch file.
'e' is not recognized as an internal or external command,
operable program or batch file.
'h' is not recognized as an internal or external command,
operable program or batch file.

What's happening is that your shell is looking at the http string and doing things to it before curl gets to look at it.

? question marks, & ampersands, and that @ sign probably need to be protected from interpretation depending on which shell or other scripting language is in use.

curl <http://download.finance.yahoo.com/d/quotes.csv?s=@%5EIXIC&f=sl1d1t1c1ohgv&e=.csv&h=0>"http://download.finance.yahoo.com/d/quotes.csv?s=@%5EIXIC&f=sl1d1t1c1ohgv&e=.csv&h=0"

should work better.

<ftp://ftp.macnauchtan.com/Excel/yahooquote.pl> Is an example that's almost what you want in perl.

-- 
--> A fair tax is one that you pay but I don't <--
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2009-10-07