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