#60 Tracking BBC News with lynx

As I mentioned earlier, one of the unsung heroes of the command-line Internet is unquestionably the lynx web browser (or its newer sibling links). Although you can use it to surf the Web if you dislike graphics, its real power is accessed on the command line itself, within a shell script.

The -dump flag, for example, produces the text but not the HTML source, as shown in the following when checking the BBC World Service website, tracking technology news:

$ url=http://news.bbc.co.uk/2/low/technology/default.stm
$ lynx -dump $url | head [1]Skip to main content BBC NEWS / TECHNOLOGY [2]Graphics version | [3]Change to UK Edition | [4]BBC Sport Home _________________________________________________________________ ...

Get Wicked Cool Shell Scripts now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.