Sorry. I wasn't specific enough. I want to be able to reliably parse job data like the last two lines of the first lpq output below, or the last many lines of the second.
Thanks, -Rick Printer: mann1-out@page2 Queue: 2 printable jobs Server: pid 91384 active Unspooler: pid 81534 active Status: waiting for subserver to exit at 12:15:17.851 Rank Owner/ID Class Job Files Size Time stalled(1713sec) =nobody@page2+412.1 S 412 http://courseinfo. 7478575 11:51:09 2 =nobody@page2+766.1 S 766 http://courseinfo. 3127521 11:51:58 Printer: mann2-out@page2 Queue: 13 printable jobs Server: pid 77696 active Unspooler: pid 52294 active Status: waiting for subserver to exit at 11:59:34.045 Rank Owner/ID Class Job Files Size Time moved->mann1-out =nobody@page2+726.1 S 726 C:/Program Files/N 1660334 11:34:09 moved->mann1-out =nobody@page2+768.1 S 768 Microsoft Word - RA. 37822 11:37:46 moved->mann1-out =nobody@page2+326.1 S 326 C:/Program Files/N 1660334 11:38:37 moved->mann1-out =nobody@page2+622.1 S 622 Microsoft Word - Sta 29174 11:42:04 moved->mann1-out =Mann Library@132+666.1 A 666 Microsoft_Word_- 508007 11:45:37 moved->mann1-out =Mann Library@132+394.1 A 394 Netscape_Your_Re 532086 11:46:31 moved->mann1-out =Mann Library@132+661.1 A 661 scandoc.cgi 1322643 11:49:25 stalled(1542sec) =Mann Library@132+149.1 A 149 httpcourseinfo. 6491990 11:33:55 9 =nobody@page2+612.1 S 612 STAT-USA/Internet _ 57665 11:54:46 10 =Mann Library@132+230.1 A 230 Microsoft_Word_-_co 322739 11:56:43 11 =nobody@page2+38.1 S 38 ordlista69 32903 11:56:53 12 =nobody@page2+44.1 S 44 CourseInfo 2.0 25515 11:56:53 13 =nobody@page2+958.1 S 958 text69fragor 27409 11:57:20 14 =nobody@page2+306.1 S 306 Microsoft PowerPoint 42972 11:57:40 15 =nobody@page2+398.1 S 398 http://catalog.lib 1562425 11:58:11 16 =nobody@page2+982.1 S 982 http://catalog.lib 3072860 11:59:05 17 =nobody@page2+626.1 S 626 text69fragor 27409 11:59:06 18 =nobody@page2+26.1 S 26 Microsoft Word Viewe 90510 11:59:10 19 =nobody@page2+660.1 S 660 ordlista69 32903 11:59:33 20 =nobody@page2+666.1 S 667 CourseInfo 2.0 25515 11:59:33 At 10:41 AM 2/15/2002, you wrote: >On Fri, 15 Feb 2002, Rick Cochran wrote: > >You could use lpc status all do determin which queues are busy and ignore >any line containing Queue:, Server:, Status:, Filter_status:, or >Unspooler. If this is what your are looking for let me know. > > > Actually, I'd be quite satisfied if someone would send me a snippit of > perl > > code which would reliably parse the lpq job status lines. > > > > At 05:11 PM 2/14/2002, you wrote: > > >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 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]| > > > > > > > ----------------------------------------------------------------------------- > > 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. > > > ----------------------------------------------------------------------------- > > > > >Rob Fausey. > >These are not the droids you're looking for. Move along. Move along. > > > >----------------------------------------------------------------------------- >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. >----------------------------------------------------------------------------- |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]| ----------------------------------------------------------------------------- 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. -----------------------------------------------------------------------------
