System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Linux shell script to check printer status

 
Highlighted
Regular Advisor

Linux shell script to check printer status

Hi

I have a smalll requirement.Actually I have to configure a monitor in OVO/unix for a Linux agent which will monitor whether the printer is ready or not.
Will someone help me write a shell or perl script that determines the status for each printer and call opcmon Monitor=<0 or 1> object= for each printer

Printer cmd and output are as :

ABC# lpq -P Printer1 testuser

if the printer is not ready i get output

ABC# lpq -P Printer1 testuser

Printer1 not ready