Created
February 11, 2018 16:21
-
-
Save gaviriar/9e54af43b89e1d80b8347cd2b126db6a to your computer and use it in GitHub Desktop.
merge PDF files in directory specified as input argument
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
if [ -z "$1" ] | |
then | |
echo "Usage: ./margepdf.sh <pdf-directory> <output-filename>" | |
exit 1 | |
fi | |
# This section assumes you have the binary pdfunite in your path | |
# If not you can install them by: | |
# sudo apt-get install poppler-utils | |
files=( $1/*.pdf ) | |
pdfunite "${files[@]}" $2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment