Download a webpage and print it to the standard output
You want to download a webpage and print its content to the standard output. For instance you want to push it through a pipe for further processing.
The easiest way is to use “curl” since by default it prints the downloaded content to the stdout:
curl http://www.python.org | less
You might want to add the switch “
-s” to make curl silent, i.e. hide the progress bar.
wget” it’s a bit more complicated:
wget -qO- http://www.python.org | less
If you want to add syntax highlighting to
less, see this post.