Download at the Speed of Typing With the cURL Command

7.14.2016
|
Justin Allen

228

These days starting any front-end tinkering you’re likely to go down a rabbit hole just getting the frameworks set up and included in your HTML file. Do you go with Grunt, Gulp, Bower? How do you just jump in as quickly as possible?

Well, nothing’s quicker than going to cdnjs, finding your library, then typing this into a terminal:

Then pasting a link to that file into your HTML. So fast and easy. You could set yourself up with a handy bash command that uses cURL to download some of your go-to includes. Leave the headache for cases that really need it.

Anything else on the internet you feel like downloading and download routinely? Just include a cURL call, or a series of them, in a shell script.

The cURL command, can do a lot more than download (which it does with the -O flag). It can fetch information about servers, data from webpages, even post data to a webform.

By the way, you can download a whole website from the command line, but for that you’d use wget. And for more sophisticated web scraping you’d want to use other tools, like Beautiful Soup.

More:

Forwardslash is a blog about creative technology, programming, the Internet, and digital aesthetics. It's a developer's notebook meets general-interest blog on technology's overlap with other topics. It's written by Justin Allen, a guy who works on websites for a living and has been writing stories for even longer than he's been writing HTML.