Curl unescape output file name

If the URL has %20a file name, specify -Oto save it, while space is preferred.

libcurl has curl_easy_unescape, but the bash curl binary does not seem to have an easy way to output the unescape file name. However, wget does unescape by default.

I am currently extracting the file name from the url, unescape it, and then use it -O.

I would like to know if there is a simpler / inline way.

+5
source share
1 answer

No, unfortunately, there is currently no way to tell curl for URL decoding the -O file name creates. It will be a good idea in the future ...

+4
source

All Articles