Skip to content
Browse files

join: Read doc_data.txt correctly

Before, grepping for Num could return more than one result, which is a
bug.  So fix it by making the grep more precise.
  • Loading branch information...
1 parent 94c855d commit 9c4997d70102069fe4cf82e088fc232d4ed0a6eb @rosslagerwall committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 pdedit-join
2 pdedit-join
@@ -21,7 +21,7 @@ else
-NUM_PAGES=$(grep Num doc_data.txt | awk '{print $2}')
+NUM_PAGES=$(grep ^NumberOfPages doc_data.txt | awk '{print $2}')
pdftk $(seq -f 'pg_%04g.pdf' 1 $NUM_PAGES) cat output out.pdf
pdftk out.pdf output $ARG flatten
rm out.pdf

0 comments on commit 9c4997d

Please sign in to comment.
Something went wrong with that request. Please try again.