![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| lpstat throughs warning | sagii | Shell Programming and Scripting | 1 | 06-24-2009 09:08 PM |
| Lpstat | draco | HP-UX | 12 | 09-10-2008 11:22 AM |
| non root user can't use lpstat | checkpro | SCO | 3 | 09-10-2008 10:47 AM |
| lpstat | sskb | UNIX for Advanced & Expert Users | 3 | 02-21-2003 10:00 AM |
| lpstat -t | stufine | UNIX for Dummies Questions & Answers | 2 | 08-06-2002 05:25 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
lpstat
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 thanks sagii |
|
||||
|
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 Code:
> 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 > echo $? 1 echo $? should produce a non-zero value (return code) on errors or warnings. Is that what you see? If that is the case, then you can use $? to have your code ignore any text output. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|