UNIX Parse HTML Page Display Contents of a Tag - One Liner?

Posted by NJTechie on Stack Overflow See other posts from Stack Overflow or by NJTechie
Published on 2010-05-24T16:54:21Z Indexed on 2010/05/24 17:01 UTC
Read the original article Hit count: 429

Filed under:
|
|
|
|

I have an HTML file and I am interested in the data enclosed by <pre> </pre> tags. Is there a one-liner that can do achieve this?

Sample file :

<html>
<title>
Hello There!
</title>
<body>
<pre>
John   Working
Kathy  Working
Mary   Working
Kim    N/A
</pre>
</body>
</html>

Output should be :

John 
Kathy 
Mary 
Kim 

Much appreciated guys, thank you!

© Stack Overflow or respective owner

Related posts about linux

Related posts about unix