all repos — dotfiles @ da6bafe3e51a56e52ad0dbcc320d939d38449b52

linux dotfiles

bin/misc/insert_blanks.sh (view raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
#!/bin/bash

if [ $# -ne 2 ]
then
  exit $E_BADARGS
else

  COMMSTR=''
  SEQ="$1"
  j="1-"
  l=""
  for i in $SEQ;
  do
    COMMSTR="$COMMSTR A$j$i B1 " 
    j=$(expr $i + 1)
    j="$j-"
    l=$i
  done
  l=$(expr $l + 1)
  COMMSTR="$COMMSTR A$l-end" 

  $(pdftk A=$2 B=blank_lttr.pdf cat $COMMSTR output 'mod_'$2)
  # $(rm pageblanche.pdf && rm 'mod_'$1)

fi