Combine PDFs with Ghostscript
To combine PDFs in the terminal, use Ghostscript:
gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=merged.pdf source1.pdf source2.pdf source3.pdf
Taken from this StackExchange answer: https://apple.stackexchange.com/a/293198/77352