Re: redirect URL
Date: Tue, 21 Mar 2017 09:07:50 -0500
On 3/21/17 8:47 AM, Claudio Piga wrote:
> Dear Curl users
> I am totally new to curl and its use, but I hope this query makes
> sense to you. Apologies if it is a rather mundane type of problem.
> I have to save queries for my research. I have to deal with urls of
> this kind:
> For brevity's sake, define this as <url>
> Using the DOS Command Prompt, from the directory where the curl.exe is
> stored, I issued the following command:
> *curl -o example.html <url>
> I think curl does not seem to like all the &, so I also tried the version:
I can't speak for the DOS shell, but to POSIX shells like bash or zsh, &
is a special symbol meaning "run in the background". To cURL, there
shouldn't be a difference. So you will indeed need to put it in quotes
so that way it is passed to cURL without the shell parsing the URL.
> *curl -o example.html "<url>"
> that is, I put the whole url in quotes.
> Note that the url (without quotes) works in a brower and downloads the
> relevant page. Unfortunately, the file created by curl is empty.
> Could you please refer me to the correct syntax for the curl command?
That should be the correct syntax. What is the output of curl -sLvvvD-
-o example.html "<url>" ?
> Many Thanks
> Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
> Etiquette: https://curl.haxx.se/mail/etiquette.html
-- Nicholas Chambers Technical Support Specialist nchambers_at_lightspeedsystems.com 1.800.444.9267 www.lightspeedsystems.com