You do:
wget url://to/file.htm
and a file named "file.htm" appears in your cwd.Using curl, you would have to do
curl url://to/file.htm > file.htm
or some other, less ergonomical, incantation.You do:
wget url://to/file.htm
and a file named "file.htm" appears in your cwd.Using curl, you would have to do
curl url://to/file.htm > file.htm
or some other, less ergonomical, incantation.Yes. But the GP said by default.
> you would have to do `curl url://to/file.htm > file.htm` or some other, less ergonomical, incantation
… which begs the conclusion that OP is unaware of `-O`.
--remote-name-all This option changes the default action for all given URLs to be dealt with as if -O, were used for each one. So if you want to disable that for a specific URL after --remote-name-all has been used, you must use "-o -" or --no-remote-name.
alias curl='curl --remote-name-all'
For me, I usually want to download files and I'm usually not doing any more processing, so I tend to type in *wget" first.
wget is better for download lists, but I'd accept the argument that a simple shell script is similarly easy.
wget "url://to/file.htm?uid=foo&q=bar&rnd=4"I'd prefer wget to be a bit more clever when handling URLs query strings though, but I guess changing this behavior now might break some scripts.
wget does have options to use the name proposed by the server, and so another option to remove the query arguments would be useful, and in line with those.
However, if the potential issues can be resolved with sane defaults, I think this would be a great new switch to add.
What?
Oh, I see now.
Do you work with many tools that can't work with files if they don't have the "right" extension? I thought that was mostly a Windows problem.
that "killer feature" for cat would be turn `cat file.html` into `cat file.html > file.html` which means if you actually wanted to cat instead of cp you'd also need `cat file.html -o -` kinda glad curl doesn't have that killer feature.