Last active
December 13, 2015 20:08
-
-
Save kris7t/4967380 to your computer and use it in GitHub Desktop.
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
[ | |
(Hudson-Nelson_*.pdf) { dup length string copy } 1000 string filenameforall | |
] % create array of filenames | |
{ lt } .sort % sort in increasing alphabetic order | |
/PN 1 def | |
{ /FN exch def | |
/PN currentpagedevice /PageCount get 1 add def % get current page count done (next is one greater) | |
FN run [ /Page PN /Title FN /OUT pdfmark % do the file and bookmark it by filename | |
} forall |
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
#!/usr/bin/env bash | |
for i in Hudson-Nelson*; do; mv "$i" `echo "$i" | sed -e 's/Hudson-Nelson_\([0-9]*\).*\.pdf$/Hudson-Nelson_\1.pdf/i'`; done | |
gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -o Hudson-Nelson.pdf control.ps |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment