The following command basically does the same thing as wget. This can come in handy since OS X and some linux distros do not ship with wget by default.
curl -O -L www.incredigeek.com/home/downloads/wget/wget-1.14.tar.gz
The two options do the following
-O, –remote-name Write output to a file named as the remote file
-L, –location Follow redirects (H)
The wget tool is an extremely useful command that allows you to download files from websites from the command line. Before you begin you should make sure you have Xcode installed. If you don’t, just download it from the App Store, its free.
To install wget on your mac you first need to download the source code from here. Next you need to extract the tarball. You can do this by double clicking the file in Finder or you can run the following command in the terminal
tar -zxvf ~/Downlaods/wget-1.14.tar.gz
Run the rest of these commands in the Terminal app.
Next we will cd into the directory.
and finally install it.
sudo make install
And of course make sure it works.
Congratulations, you have successfully compiled wget from source.