Print multiple copies page by page using lp command

Hi

I have a pdf file that is being generated using the rwrun command in the shell script.
I then have the lp command in the shell script to print the same pdf file.
Suppose there are 4 pages in the pdf file , I need to print 2 copies of the first page, 2 copies of the second page , then 2 copies of third page and 2 copies of the fourth page in this order.
So it has to print the pdf file page by page.
Can you please help me with this issue ?

rwrun is not a unix command (standard unix command...)...
You have not mentionned your OS...
if you are using lp (true unix command...) I am sure it will do exactly what you described if you give the correct options ( 2 copies ).

The OS is SunOS 5.10
I am using

lp -d <printer name> -o uncollate -n2

.

The uncollate option if it works , will resolve my issue. But its not working.

As there are 4 pages in the pdf and I need 2 copies ,
the order I expect is 1 1 , 2 2 , 3 3 , 4 4 .
But its printing in 1 2 3 4 , 1 2 3 4 order.
Thats my issue.

I just tried on an AIX and HP-UX and it prints 2 copies at a time...
e.g.

man passwd|lp -n2 -o media=A4 -dlpvbe

I am not sure to find a solaris10 here that has a spooler or printer defined...
looking...

What other options are you giving? (a pdf ilfe cannot get printed like that...)
-o option is printer dependant so it might be unsupported with your printer... (what kind/model?)
So far found no solaris10 with printers...

Hi

The command is

cat <path of the pdf file>  | /usr/bin/acroread -toPostScript  | lp -d <printer name> -n2 -o uncollate

Found this:
We Sun Solve: Bug details for 1137210

Not much of a help though..

Thank you Vbe.

I am running the shell script from the Oracle apps concurrent manager. Will that make any difference?