Created
July 6, 2019 14:29
-
-
Save riccardoscalco/99545078bd73bec4f1af61ea16bea9d9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Install ghostscript. | |
# Assume A and B have the same amount of files. | |
# Assume file in A are named `testo_1`, and files in B are named `disegno_1`. | |
END=`ls A/*.pdf | wc -l` | |
echo "merging..." | |
for (( c=1; c<=$END; c++ )) | |
do | |
gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=C/report_$c.pdf A/testo_$c.pdf B/disegno_$c.pdf | |
done | |
echo "done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment