Date: Sat, 06 Nov 2004 09:45:17 -0700 From: Martin Paredes <mapsware@prodigy.net.mx> To: freebsd-questions@freebsd.org Subject: find printers with problems Message-ID: <200411060945.17767.mapsware@prodigy.net.mx>
next in thread | raw e-mail | index | archive | help
Hi listers. I need to make a script to find the printers with problems, "queuing is=20 disabled" or "printing is disabled", but the problem is how the lpc command= =20 print the information. # lpc status all prtsin2114: =A0 =A0 =A0 =A0 queuing is enabled =A0 =A0 =A0 =A0 printing is enabled =A0 =A0 =A0 =A0 1 entry in spool area =A0 =A0 =A0 =A0 printer idle prtsin2111: =A0 =A0 =A0 =A0 queuing is disabled =A0 =A0 =A0 =A0 printing is enabled =A0 =A0 =A0 =A0 no entries in spool area =A0 =A0 =A0 =A0 printer idle prtsin2112: =A0 =A0 =A0 =A0 queuing is enabled =A0 =A0 =A0 =A0 printing is disabled =A0 =A0 =A0 =A0 no entries in spool area =A0 =A0 =A0 =A0 printer idle prtsin2113: =A0 =A0 =A0 =A0 queuing is enabled =A0 =A0 =A0 =A0 printing is enabled =A0 =A0 =A0 =A0 no entries in spool area =A0 =A0 =A0 =A0 printer idle I had been trying to use awk, sed and grep to produce something like : prtsin2111::queuing is disabled:printing is enabled prtsin2112::queuing is enabled:printing is disabled but my problem is how to substitute the string (new line and tab) "\n\t" by= =20 ":". TIA maps
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200411060945.17767.mapsware>