| Harald Lüngen | 866b20f | 2024-09-17 09:08:34 +0300 | [diff] [blame] | 1 | # putting the end tag /</idsDoc> in the right place |
| 2 | BEGIN {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 | |||||