Skip to Content.
Sympa Menu

baslinux - Re: [BL] printing in BL3 with wp

baslinux AT lists.ibiblio.org

Subject: Baslinux mailing list

List archive

Chronological Thread  
  • From: sindi keesan <keesan AT sdf.lonestar.org>
  • To: baslinux AT lists.ibiblio.org
  • Subject: Re: [BL] printing in BL3 with wp
  • Date: Fri, 25 Feb 2005 21:03:14 +0000 (UTC)

I looked in wp and it appears to be assigning the LAST printer port as device:
device=`dmesg |grep lp |tail -n1| cut b1-3'

dmesg |grep lp lp0: using parport0
lp1: using parport1
lp1 out of paper (it is not in use or printer is off)


Is there some way to rewrite the device=... line to select the first three characters of output of grep lp, rather than the first three characters of the last line? Is there some equivalent to 'tail', maybe 'head', which would extract the first line produced by grep? Then linux, like DOS, would use lp0 as default. (Unless of course it is not plugged in then it still won't work).

dmesg |grep lp |tail -n1 : lp1 out of paper
The whole line inside the ` ` : lp1

So wp uses the last printer rather than lp0. How would I change it to use lp0 instead of lp1 where I have two lps? Can I simply edit it to read
device=lp0 ???

In cases of two parports, could you write a script that would choose the parport that is NOT 'out of paper' to print to?





Archive powered by MHonArc 2.6.24.

Top of Page