The following is part of an XML file I'm working with at work.
Code:
<ans_type>2</ans_type>
<ans_guid>1270B4CE-AB12-4C4B-8135-EF501297B983</ans_guid></ant>
<t><ans_position>2</ans_position><ans_text>time locate</ans_text><ans_type>2</ans_type>
<ans_guid>87BC9D34-9A63-4140-BC54-1667682FD9C6</ans_guid>
</ant><ant><ans_position>3</ans_position><ans_text>
I need to write a shell script that will remove ever thing except what is between the 'ans_type's and also the 'ans_guid's and put them into a text file
Exp. text file:
2 1270B4CE-AB12-4C4B-8135-EF501297B983
2 87BC9D34-9A63-4140-BC54-1667682FD9C6
I've been trying to use 'sed' But I'm new to useing that command and can't seem to get it write. Maybe I shouldn't be useing 'sed'.
Thanks for the help.