100 Useful Command-Line Utilities

by Oliver; 2014

96. elinks, curl

Note: elinks is not a default shell program. You may have to download and install it.

elinks is a terminal-based web browser. Surfing the web from the terminal is novel, if not terribly convenient.

Go to The New York Times website:
$ elinks www.nytimes.com
For example, here's what Google looks like in my pink terminal:

image

More usefully, elinks provides a way to scrape webpages into text files:
$ elinks www.nytimes.com > dump1.txt
If you want the actual html code, you can use curl:
$ curl www.nytimes.com > dump2.txt
Read more about curl on its homepage.

As noted in the Vim wiki, you can also examine the HTML source code of a page right from your terminal with Vim:
$ vim http://www.nytimes.com/

<PREV   NEXT>