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>" {} |
Harald Lüngen | c20fe11 | 2024-09-19 10:55:10 +0300 | [diff] [blame^] | 5 | $0 ~ "<idsDoc" { |
Harald Lüngen | 866b20f | 2024-09-17 09:08:34 +0300 | [diff] [blame] | 6 | if(DOCCOUNT++ > 0){ |
| 7 | print " </idsDoc>"; |
| 8 | }; |
| 9 | print $0; |
| 10 | } |
| 11 | $0 ~ "</idsCorpus>" {print " </idsDoc>\n</idsCorpus>"} |
| 12 | |
Harald Lüngen | c20fe11 | 2024-09-19 10:55:10 +0300 | [diff] [blame^] | 13 | $0 !~ "</idsDoc>" && $0 !~ "</idsCorpus>" && $0 !~ "<idsDoc" {print} |
Harald Lüngen | 866b20f | 2024-09-17 09:08:34 +0300 | [diff] [blame] | 14 | |