xml - Grabbing specific lines from block of TEXT -
i have large text (xml?) dump , want out lines containing content.
for example, want 'text here' part grepped out or something. there way grep out throughout file 'values' of 'content' tags?
<mtg:property displayname="content" hidden="false" name="content" nullable="true" readonly="false" type="string"> <mtg:value>text here</mtg:value> </mtg:property> thanks help.
awk '/content/ {print $2}' fs='<mtg:value>' rs='</mtg:value>' - set record separator
</mtg:value> - set field separator
<mtg:value> - find records containing
content, print field 2
Comments
Post a Comment