Sorry for my english!
I'm using Debian squeeze and for an assignement, i have create 2 virtual pdf cups printers. Both are working very well.
To test the different administion command; i try to disable one of the printer and move his queue file to the second one. I'm able to do it easily.
Now, i wish to write a bash script that wil test the status of the printer. So that,if the printer is disable, it just execute the "move" script.
Is there a way to know the status of a cups printer and use that information in a script?
For example, a command/function that can return "O" is the cups printer is enable and "1" if not.
I also try using "/usr/sbin/lpc" and after it "status PrinterName". How can be my script so that: after execution "/usr/sbin/lpc" it just execute the command "status" with the first paramater "$1".
Thanks for your help,