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.
source
share