cancel
Showing results for 
Search instead for 
Did you mean: 

Printer Queues Sequence

michael hong
Occasional Advisor

Printer Queues Sequence

On HP-UX 10.20, when I use "lpstat" , it will show the status of every queues ( including remote queues)like that:
printer queue 1 , ...
printer queue 2, ...
printer queue 3, ...
Where does HP-UX get this sequence from? Can I change the showing sequence like that:
printer queue 2 , ...
printer queue 1, ...
printer queue 3, ...
The reason I want this is that some applications ( for example: framemaker)on HP-UX seem to read this sequence and always treat the first one as the default printer queue, no matter which queue I have already set as the default for "lpstat -d".
2 REPLIES
James R. Ferguson
Acclaimed Contributor

Re: Printer Queues Sequence

Michael:

Pipe the output of lpstat to sort and sort on whatever you wish. See man pages for sort and look at the -r option. The simplest case would be:

# lpstat|sort -r

...JRF...
Andreas Voss
Honored Contributor

Re: Printer Queues Sequence

Hi,

the sequence is getting from /var/spool/lp/pstatus
This file is binary so you cannot change the sequence order within it.
Use James' solution.

Regards

Andrew