Do I need a special command, or "$1" supposed to work for a script in the automator?
Her is the script if you want to look at:
- Code: Select all
echo "Page count: "
ournum=`gs -q -dNODISPLAY -c "("$1") (r) file runpdfbegin pdfpagecount = quit" 2>/dev/null`
declare -i counter;
declare -i counterplus;
counter=1;
while [ $counter -le $ournum ] ; do
echo $counter
newname=`echo $1 | sed -e s/\.pdf//g`
reallynewname=$newname-$counter.pdf
counterplus=$counter+20;
# make the individual pdf page
yes | gs -dBATCH -sOutputFile=$reallynewname -dFirstPage=$counter -dLastPage=$counterplus -sDEVICE=pdfwrite "$1" >& /dev/null
counter=$counterplus
done;
I am completely novice; I get the script from other people. Can sb help me please?