I was trying to download a file on my Mac and realised that there is no wget for Mac. Since I consistently use wget I decided to find a way to get wget for mac. I found a quick way to create an fake wget command by creating an alias of curl. By creating the alias, I am able to call ‘wget’ and it will invoke curl -O in the background and download the file just as wget would have. This is a quick way to get wget for Mac.
CMAKEINSTALLER -prefix=/usr/local -skip-license else. I'm using curl instead of wget + travisretry, but this doesn't matter. You can still. Though curl is easy to use, having some knowledge of the command line is recommended. Download Exact Match Files with curl -O Using the uppercase -O flag with curl downloads the file from the remote server while maintaining the exact file name, the basic syntax for this is the following.
Using Curl As A Wget For Mac Replacement
In order to create an alias of `wget` that will simply run the command curl -O I ran the command below:
Now when i type ‘wget http://www.example.com’ it will download the url as you would expect from wget. As mentioned before, in the background it will be invoking curl to download the file. So when I run `wget`, it is actually executing curl -O to download the file as we won’t even notice the difference. Well maybe a small difference. But the end result is the same and your file is downloaded.
Example Using The Replacement wget For Mac
The -O option to curl tells curl to save the URL as a file rather than displaying the source.