curl-users
Re: globbing error
Date: Sun, 23 Sep 2001 14:58:43 +0200 (MET DST)
On Fri, 21 Sep 2001, Brian Moon wrote:
> I am using the command line tool to pull several urls down at one time and
> having trouble getting the files saved to correct names. According to the
> docs this:
>
> # curl http://images.dealnews.com/arrow_{down,up}.gif --output "#1.gif"
>
> should yield two files named down.gif and up.gif. Instead I get the
> first file output to 1.gif and the other output to the screen.
This confused me at first too. Then I tried adding single-quotes around the
URL, and it worked like we want it to:
# curl 'http://images.dealnews.com/arrow_{down,up}.gif' --output "#1.gif"
Obviously, without the quotes, the shell itself splits that URL into two
different URLs before they're passed to curl and this of course disables the
globbing!
-- Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/Received on 2001-09-23