#!/bin/bash

# for f in *.pdf ; do fout=`echo $f | sed 's/.pdf$//g' | sed 's/ /_/g'`; ~/Recherche/Program/Ogmios2/Lingua-Ogmios/bin/pdftoOgmiosXML.pl $f $fout fr > $fout.xml ;done

cat `cat $1 |head -1` | head -2

cat `cat $1` |sed -e 's/<\/documentCollection/\n<\/documentCollection/g' | grep -v '<?xml version' | grep -v '<documentCollection' | grep -v '</documentCollection'

cat `cat $1 |head -1` | sed -e 's/<\/documentCollection/\n<\/documentCollection/g' | tail -1

exit;

