Operating System - HP-UX
1833788 Members
2116 Online
110063 Solutions
New Discussion

Re: Synchronize print queues on hosts ( lpstat -v)

 
Graham Van der vaart
Frequent Advisor

Synchronize print queues on hosts ( lpstat -v)

Hi
I'm wanting to sync the printer queues on 3 hosts. If a queue is added/deleted or modified
on a host then the other 2 should be sync'ed
automatically.
Nodes a and b are in a cluster and a and c are in a DRP setup using EMC SRDF (manual switch).

I have created an ITO cmd script that reports whether a change has occcurred (it uses lpstat -v and daily does a diff on the output).
I wanted to then create a script and pass parameters from the diff file for the UNIX queue name, the remote queue name and the remote hostname. My problem is that lpstat -v output is spread over 2 lines for a single queue.This makes things difficult.How can I get the output in one line? Or is there an easier way of doing this thing?
Regards
Graham
2 REPLIES 2
Sandip Ghosh
Honored Contributor

Re: Synchronize print queues on hosts ( lpstat -v)

Write a script using trasferqueue command which will update the other systems once in a day, everyday.

Sandip
Good Luck!!!
Pete Randall
Outstanding Contributor

Re: Synchronize print queues on hosts ( lpstat -v)

Graham,

I would suggest you re-submit your question under something like "How to combine multi-line output into a single line". I'm reasonable certain this can be done with awk - I'm just not certain how.

Pete

Pete