If you ever need to combine all first pages of a bunch of PDF files into a single file you can use this script. Comes in handy to prepare train tickets for turning them in for tax returns. They come with two pages one of which is only the TOS which I don’t want to print to save the environment and resources.
for file in *.pdf; do
pdftk "A=$file" cat A1 output "$tmpdir/$file"
pdftk $tmpdir/*.pdf cat output $dest
rm -rf $tmpdir