I need help to filter a part of text from my original logs:
<variable>
<status type="String"><![CDATA[-1]]></status>
<errorCode type="String"><![CDATA[[bpm]]]></errorCode>
<mensagens type="MensagemSistema[]">
<item>
<msg_err type="String"><![CDATA[ERROR1-This is error: - THIS TEXT IS VARIABLE.]]</msg_err>
<msg_err_stack type="String"><![CDATA[stack_trace]]></msg_err_stack>
</item>
</mensagens>
</variable>
The part that I want is:
<msg_err type="String"><![CDATA[ERROR1-This is error: - THIS TEXT IS VARIABLE.]]>
... and this text is variable.
I tried to perform this with sed, but I wouldn't find a example to remove text outside two strings. Just another thing this is unix
thanks in advance Tiago