How to skip commented lines in sipp xml file

218 Views Asked by At

I am trying to grep for a pattern in sipp xml file. That pattern might be commented in that file, it should skip the commented occurence and search for next occurence. Pattern : pcap file : test.xml As <exec play_pcap_audio="MULAW_p40_song.pcap"/> commented in xml file, it should return only <exec play_pcap_audio="MULAW_p41_song.pcap"/>

But I am getting

grep "pcap" test.xml
<exec play_pcap_audio="MULAW_p40_song.pcap"/>
<exec play_pcap_audio="MULAW_p41_song.pcap"/>

test.xml :

<!--
<nop>
  <action>
    <exec play_pcap_audio="MULAW_p40_song.pcap"/>
  </action>
</nop>
-->
<nop>
  <action>
    <exec play_pcap_audio="MULAW_p41_song.pcap"/>
  </action>
</nop>

Anyone can help me on this?

0

There are 0 best solutions below