blob: e267553b84afbb9fa68a1ee1e0d088af4881ec64 [file] [log] [blame]
# putting the end tag /</idsDoc> in the right place
BEGIN {DOCCOUNT = 0;}
$0 ~ "</idsDoc>" {}
$0 ~ "<idsDoc>" {
if(DOCCOUNT++ > 0){
print " </idsDoc>";
};
print $0;
}
$0 ~ "</idsCorpus>" {print " </idsDoc>\n</idsCorpus>"}
$0 !~ "</idsDoc>" && $0 !~ "</idsCorpus>" && $0 !~ "<idsDoc>" {print}