curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Curl's -O option doesn't support multiple URLs for saving them as separate files.

From: Nicolas Sterchele via curl-users <curl-users_at_cool.haxx.se>
Date: Sun, 19 Jul 2020 20:22:16 +0200

On 2020-07-19 14:30, Hongyi Zhao via curl-users wrote:
>Hi,
>
>I try to use the -O option for multiple URLs as following:
>
>$ curl -x socks5://127.0.0.1:18887 -O
>https://www.quantum-espresso.org/upf_files/H.pbe-rrkjus.UPF
>https://www.quantum-espresso.org/upf_files/O.pbe-rrkjus.UPF
>https://www.quantum-espresso.org/upf_files/P.pbe-n-van.UPF
>https://www.quantum-espresso.org/upf_files/Zr.pbe-nsp-van.UPF
>
>But only the first file is saved, all the others are output to stdout.
>Any hints for this problem?

Hi,
As the doc explains for the "-O" arg "You may use this option as many
times as the number of URLs you have." So you have to repeat "-O" as
many times as you have url ... 4

regards,

nicolas.
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2020-07-19