Created
October 26, 2016 16:28
-
-
Save blizzz/d7d6d46e62a36741e1e976cc662eda25 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/usr/bin/bash | |
if [ $# -lt 2 ]; then | |
echo "merge single pdfs into one document" | |
echo "Usage" | |
echo "$0 Outputfile Inputfiles" | |
echo "Examples:" | |
echo "\"$0 fulldoc.pdf page1.pdf page2.pdf page3.pdf\"" | |
echo "\"$0 fulldoc.pdf page*.pdf\"" | |
echo "\nrequires ghostscript" | |
exit | |
fi | |
TARGET=$1 | |
shift | |
gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile="$TARGET" "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment