Last active
August 29, 2015 14:11
-
-
Save zstumgoren/a93f597651e32d32bcfd to your computer and use it in GitHub Desktop.
merge pdf files from a directory
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
| #!/bin/bash | |
| pdf_files=(*.pdf) | |
| n=1000 | |
| count=0 | |
| for ((i=0; i < ${#pdf_files[@]}; i+=n)); do | |
| count=$((count+1)); | |
| # UPDATE DIRECTORY NAME, AS NEEDED | |
| pdfjam "${pdf_files[@]:i:n}" -o ../FINAL-COMBINED/inbox/"$i".pdf | |
| ; | |
| echo $count; | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment