views:

10

answers:

0

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.

Thanks for your help,