Combine 1st page of many PDFs

Combine 1st page of many PDFs

This snippet of code is useful when you have many similar pdfs and need a file that takes a single page from each pdf.

The 1st stage is to extract the 1st page page of each pdf to a new file:
for i in *.pdf ; do pdftk "A=$i" cat A1 output "temp_$i"; done

Then combine those into a single pdf and remove the temp files:
pdftk temp* cat output combined.pdf; rm temp*

Not the cleanest, but does the job.

Inspired by here.