Hi,
here is lpstat command with queue name. queue name is not valid but lpstat takes my local queue and shows the following results.is there any way that i can stop it after waring message and dont take local print queue. i would like to print a message that queue is not valid but when lpstat creates output like given below i cant print msg because it has valid print queue name xerox and status is READY. i have check on status.please guide me
lpstat -ppfs39p07
qstatus: (WARNING): 0781-102 Invalid printer name: pfs39p07.
Queue Dev Status Job Files User PP % Blks Cp Rnk
------- ----- --------- --- ------------------ ---------- ---- -- -----
xerox @DDCM READY
xerox xerox READY
There are no standards for lpstat behavior - mine simply reports an error. Yours seems to do interesting things, so let's investigate before we can answer your question.
Run your lpstat command from the prompt.
Next echo $?
Example
here is the output with space
lpstat -p pfs39p07
usage: lpstat [-drstW][-aDestination,...][-cClassname,...]
[-oOutRequirement,...][-pPrinter,...][-uUser,...]
[-vPrinter,...] [jobid,...]
Prints LP status information.