blob: e267553b84afbb9fa68a1ee1e0d088af4881ec64 [file] [log] [blame]
Harald Lüngen866b20f2024-09-17 09:08:34 +03001# putting the end tag /</idsDoc> in the right place
2BEGIN {DOCCOUNT = 0;}
3
4$0 ~ "</idsDoc>" {}
5$0 ~ "<idsDoc>" {
6 if(DOCCOUNT++ > 0){
7 print " </idsDoc>";
8 };
9 print $0;
10 }
11$0 ~ "</idsCorpus>" {print " </idsDoc>\n</idsCorpus>"}
12
13$0 !~ "</idsDoc>" && $0 !~ "</idsCorpus>" && $0 !~ "<idsDoc>" {print}
14