For my usage: * Wget's the interactive, end-user tool, and my go-to if I just need to download a file. For that purpose, its defaults are more sane, its command line usage is more straightforward, its documentation is better-organized, and it can continue incomplete downloads, which curl can't. * Curl's the developer tool-- it's what I'd use if I were building a shell script that needed to download. The command line…
Curl vs. Wget
131–140 of 205 posts
Re: Curl vs. Wget
#132Re: Curl vs. Wget
#133Also putting this out there—for nicer REST API interaction on the CLI, and a little more user-friendliness, you might also want to add HTTPie[1] to your toolbelt. It's not going to replace curl or wget usage, but it is a nicer interface in certain circumstances. [1] https://github.com/jkbrzt/httpie
I've been loving HTTPie, and for my somewhat idiosyncratic usage it's completely replaced curl and wget. (Of course, most people probably don't spend as much time as me fiddling with poorly documented third party REST APIs.) Also amazing: jq.
Re: Curl vs. Wget
#134Earlier quoted context omitted.
-C requires you to specify the byte offset, and you also need --append or >> so it's not quite the same.
Actually no. From the manpage: Use "-C -" to tell curl to automatically find out where/how to resume the transfer. It then uses the given output/input files to figure that out.
Re: Curl vs. Wget
#135Earlier quoted context omitted.
I'm not sure why you feel like that, I switched back to Windows after ~1 year of using OSX, I wouldn't say its "miserable" there is really nothing I could do in OSX's command line that can't do in windows.
What is your Windows command-line environment? Plain CMD prompt or Cygwin? Or something else?
Re: Curl vs. Wget
#136Earlier quoted context omitted.
I'm not sure why you feel like that, I switched back to Windows after ~1 year of using OSX, I wouldn't say its "miserable" there is really nothing I could do in OSX's command line that can't do in windows.
I feel like you can't have really scratched the surface on what you can do in a real Unix shell. I doubt that Windows has support for things I use all the time (like command substitution <(some command) where the output of a command appears to be a file to a program).
Re: Curl vs. Wget
#137Earlier quoted context omitted.
Actually no. From the manpage: Use "-C -" to tell curl to automatically find out where/how to resume the transfer. It then uses the given output/input files to figure that out.
Correct, but very unintuitive
Re: Curl vs. Wget
#138Earlier quoted context omitted.
This is an extremely minor quibble, but the dependency on Python makes me less inclined to use it. I'm stuck on Windows for a lot of the work I do so configuring Python is never fun and there is no one line installation method from what I can tell. Putting it up on chocolatey[0] might be a good idea. Not sure how feasible that is however. [0] https://chocolatey.org/packages?q=httpie
Should have lead that comment with "I'm on Windows, so". Of course it's going to be miserable to use any command-line tool on Windows. It's Windows.
PS> $page = wget http://www.yahoo.com/ PS> $page.Images | sort width | select src, width, height | Export-Csv -Encoding utf8 images.CSV
Re: Curl vs. Wget
#139Re: Curl vs. Wget
#140Earlier quoted context omitted.
Merge the code, hard link the filenames to the same executable and get it to change behavior based on the name it's invoked under.
No need to merge code. Take curl as is, and set different defaults based on executable name.
Edit: nevermind, I just learned that wget can download a page's resources or even inline them (-k apparently), that's a bit of a way off from curl's purpose. Better keep them separate tools, although wget might benefit from using libcurl so they don't have to implement lots of stuff like https or http2.