#!/bin/sh [ "$1" -a "$2" -a "$3" ] || { echo "Usage: pdfselect inputfile outputfile" exit 0 } texexec --pdfselect --selection="$1" --output=pdftex "$2" && mv texexec.pdf "$3" rm -f texexec.*