#!/bin/bash
for i in *.odt; do
echo "Converting [ $i ]"
unoconv -f pdf "$i"
echo "Extracting 1st page of [ $i ]"
i="${i%odt}pdf"
pdftk P="$i" cat P1-1 output "$i".1
done
echo "Merging pdfs"
pdftk *.1 cat output result.pdf
rm *.1
Você precisa instalar o unoconv
e o pdftk
.
Ubuntu: sudo apt-get install unoconv pdftk