blob: fad3db2101f8ac1ce974b79a0e5996844f1825df [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>" {}
Harald Lüngenc20fe112024-09-19 10:55:10 +03005$0 ~ "<idsDoc" {
Harald Lüngen866b20f2024-09-17 09:08:34 +03006 if(DOCCOUNT++ > 0){
7 print " </idsDoc>";
8 };
9 print $0;
10 }
11$0 ~ "</idsCorpus>" {print " </idsDoc>\n</idsCorpus>"}
12
Harald Lüngenc20fe112024-09-19 10:55:10 +030013$0 !~ "</idsDoc>" && $0 !~ "</idsCorpus>" && $0 !~ "<idsDoc" {print}
Harald Lüngen866b20f2024-09-17 09:08:34 +030014