I have a file which contains XML tags. Each line has a root element and a couple of sub elements into it. The structure resembles something like this
<document><title>some title1</title><abstract>Some abstract1</abstract></document>
<document><title>some title2</title><abstract>Some abstract2</abstract></document>
<document><title>some title3</title><abstract>Some abstract3</abstract></document>
<document><title>some title4</title><abstract>Some abstract4</abstract></document>
Now I have to find all lines where the tag contains a particular word. eg: get all lines that contain abstract1 inside the <abstract>
tag.
How to do it in either grep, awk or sed?