Download A File Using Cygwin and cURL
Download A File Using Cygwin and cURL
I'm starting to like using Cygwin more and more. Command line scripting allows me to get the information without all of the hassle. Why should I open Firefox, type in the address, deal with the ads, and click 5 links before I can get to what I want when I can use command line to download what I want? Here's how you can download a file using the cURL package from the command line.
The Bash Script
curl http://davidwalsh.name/ --O homepage.txtcopycurl http://davidwalsh.name/ --O homepage.txtThe above example downloads my homepage and saves it into a file named homepage.txt. The file gets downloaded to the c:\cygwin\home\{user}\ folder. For fun, here's how to download Cygwin's setup file from Cygwin.
curl http://cygwin.com/setup.exe --O cygwin-setup.execopycurl http://cygwin.com/setup.exe --O cygwin-setup.exeGreat stuff. What would you use this for?