> From [EMAIL PROTECTED] Thu Feb 14 15:09:24 2002
> Date: Thu, 14 Feb 2002 17:11:04 -0500
> To: [EMAIL PROTECTED]
> From: Rick Cochran <[EMAIL PROTECTED]>
> Subject: LPRng: lpq information format
>
> I'm using sockets to get queue status and I'm finding it difficult to find
> a way to parse the returned data in a way which will work in all cases.
>
> It would be nice if one could get a ':' (or something else) delimited
> string back.
>
> -Rick
>
>
> |Rick Cochran phone: 607-255-7618|
> |Cornell CIT - Systems & Operations - Net-Print FAX: 607-255-8521|
> |730 Rhodes Hall, Ithaca, N.Y. 14853 email: [EMAIL PROTECTED]|
See the lpq -v format. This is probably what you want... cause I do
exactly the same thing:
h110: {104} % lpq -v |head
Printer: lp@h110 Printing: no
Aborted: no
Spooling: no
Queue: no printable jobs in queue
Server: no server active
SPOOLCONTROL=
change=0
printing_aborted=0
printing_disabled=0
Status: subserver process pid 69361 exit status 'JSUCC' at 09:27:17.713
You can get this format by using the following LPRng request:
\011printername\n
h110: {104} % printf "\011lp\n" | nc localhost 515
As they say, your mileage may vary.
Patrick Powell Astart Technologies,
[EMAIL PROTECTED] 9475 Chesapeake Drive, Suite D,
Network and System San Diego, CA 92123
Consulting 858-874-6543 FAX 858-279-8424
LPRng - Print Spooler (http://www.lprng.com)
-----------------------------------------------------------------------------
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address
If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body. For the impatient,
to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED]
with: | example:
subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED]
If you have major problems, send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------