Linux – How to convert HTML to text

conversioncurlhtmllinuxterminal

How it is possible to convert HTML to text file in Linux? For example I want to curl a query to Google, then convert the output html to text and read converted text on my terminal. I am using RHEL6.

Best Answer

I don't think curl has a built in HTML processor. However:

lynx --dump <URL>

does the trick.

If you still want to use curl, you could use html2text (available in Ubuntu).

Related Question