summaryrefslogtreecommitdiffstats
path: root/pdfmerge
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2014-09-13 00:07:55 +0200
committerFlorian Pritz <bluewind@xinu.at>2014-09-13 00:07:55 +0200
commit8450e9ac59dfb678ae3fc2adca5bb837804710f3 (patch)
tree655b5c145aeb9f30e7e8ea8b019b38474176c994 /pdfmerge
parente59d9c40e64cb5e6fb4fcfd6401583c03bbd99be (diff)
downloadbin-8450e9ac59dfb678ae3fc2adca5bb837804710f3.tar.gz
bin-8450e9ac59dfb678ae3fc2adca5bb837804710f3.tar.xz
add some new scripts
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'pdfmerge')
-rwxr-xr-xpdfmerge11
1 files changed, 11 insertions, 0 deletions
diff --git a/pdfmerge b/pdfmerge
new file mode 100755
index 0000000..b7dd387
--- /dev/null
+++ b/pdfmerge
@@ -0,0 +1,11 @@
+#!/bin/bash
+# merge multiple pdfs into one
+
+args=$(($# - 1))
+
+if [[ $# = 0 ]] || [[ $args = 0 ]]; then
+ echo "usage: ${0##*/} input.pdf [input2.pdf ..] output.pdf"
+ exit 0
+fi
+
+gs -dNOPAUSE -dQUIET -dBATCH -sOutputFile=${!#} -sDEVICE=pdfwrite "${@:1:$args}"