Operating System - Linux
1752782 Members
5891 Online
108789 Solutions
New Discussion

Linux shell script to check printer status

 
Jessica P
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