I have a list of links.
example
i only want to get the search engine links being
best way to go about this?
i was using sed, but its printing the 2nd h3
any input would be great ;)
example
Code:
<h3>search engine links</h3> <a href="http://google.com">google</a> <a href="http://www.bing.com">bing</a> <a href="http://www.yahoo.com">yahoo</a> <h3>payment links</h3> <a href="http://www.paypal.com">paypal</a> <a href="http://www.paxum.com">paxum</a>
Code:
<a href="http://google.com">google</a> <a href="http://www.bing.com">bing</a> <a href="http://www.yahoo.com">yahoo</a>
i was using sed, but its printing the 2nd h3
Code:
sed -n '/<h3>/,/<\/h3>/p' test.txt


Comment