I have a big xhtml file with lots of junk text that I don't need. I only need whatever text that lies between two specific strings that occur many times within that file, e.g.
<html>
<xyz> unneeded text </xyz>
<mytag> important text1 </mytag>
<xyz> unneeded text </xyz>
<xyz> unneeded text </xyz>
<mytag> important text2 </mytag>
<mytag> important text3 </mytag>
<xyz> unneeded text </xyz>
</html>
My output should be:
important text1
important text2
important text3
I need to do that using Bash script.
Thanks for your help