-O file
--output-document=file
The documents will not be written to the appropriate files, but all will be concatenated together and written to file. If
-
is used as file, documents will be printed to standard output, disabling link conversion. (Use./-
to print to a file literally named-.
)
Então,
wget -O somefile.extension http://www.vim.org/scripts/download_script.php?src_id=9750
Ou você pode obter wget
para resolver isso usando a opção --content-disposition se suportada pela sua versão.
wget --content-disposition http://www.vim.org/scripts/download_script.php?src_id=9750
Advertências de acordo com a página do manual,
--content-disposition
If this is set to on, experimental (not fully-functional) support for "Content-Disposition" headers is enabled. This can currently result in extra round-trips to the server for a "HEAD" request, and is known to suffer from a few bugs, which is why it is not currently enabled by default.
This option is useful for some file-downloading CGI programs that use "Content-Disposition" headers to describe what the name of a downloaded file should be.
Você pode obter o mesmo comportamento automatizado com curl
, usando
curl -JLO http://www.vim.org/scripts/download_script.php?src_id=9750
-O
usa o nome remoto e -J
força o -O
a obter esse nome do cabeçalho de disposição de conteúdo em vez do URL, e -L
segue os redirecionamentos, se necessário.