Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- #simple script to get range of pages to use for reordering pages in a pdf, in order to impose as booklet with another program like Multivalent Impose tool. Interactive version, not usable in pipes
- #
- #number of pages must be a multiple of 4 or script will exit
- #
- echo " enter number of pages"
- read tot
- if [ $(( $tot % 4 )) -eq 0 ]
- then
- tot4="`let DIVISION=$tot/2; echo $DIVISION`"
- for ((x=$tot, y=1;x>=$tot4, y<=tot4;x--, y++)); do echo "$x $y "; done | awk '{ print ; getline ; print $2, $1 }' | tr '\n' ' '
- else
- echo " $tot is not a multiple of 4"
- fi
- exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement