#!/bin/bash full_filename=NZDataFull.xml if [ ! -f $full_filename ] ; then echo "Did not detect uncompressed MARC-XML file '$full_filename'" echo " => Including ISO-8859-1 character encoding XML processing instruction at start" echo "" > $full_filename echo "" >> $full_filename echo " => Appending uncompressed data to '$full_filename' ..." gzip -d --stdout pubsnzmetadata.xml.gz >> $full_filename echo "" >> $full_filename echo " => ... Done" fi echo "Splitting '$full_filename', this may take some time ..." java -classpath marcXML_Split/lib/marc4j-2.6.0.jar:marcXML_Split/lib/guava-15.0.jar:marcXML_Split/bin split $*