Printing: Different pages from different feeds (pdf)

I solved my problem with a shell script:

#!/bin/sh
i=1
while [ $i -le <number of printouts> ]
do
  lp -o media=<name of feed> <file> -P 1
  lp <file> -P 2-<number of pages>
  i=`expr $i + 1`
done