if URL has %20
in file name, specify -O
will keep it, while space is preferred.
libcurl has curl_easy_unescape
, but the curl binary in bash doesn't seem to have an easy way to unescape output file name. However, wget does unescape by default.
currently I extract file name from url, unescape it, then use -o
.
I would like to know if an easier/builtin way exists.
No, unfortunately there's currently no way to tell curl to URL decode the file name -O creates. It feels like a good idea to offer in the future...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With