I have an XML file that's ~1GB big, with
grep -c "</record>')," file
238613
I'd like to split it into chunks of 1000 records, but each file needs to end with
</record>'),
I would then end up with 238 files.
Here is the actual file with the first two records:
\set bib_tag '''IMPORT CONCERTO'''
INSERT INTO marcxml_import (tag, marc) VALUES
(:bib_tag,'<record xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<datafield and subfield data>
</record>'),
(:bib_tag,'<record xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<datafield and subfield data>
</record>'),