I'm using the default sh for redhat which is bash-1.14.7-22 ie /bin/sh is a link
 to /bin/bash.

 Yes "sh pclbanner > /tmp/out" works - however no options are given. 
 I dug into this today and have found the following :

 - psbanner and pclbanner both have the same error at line 50 and 22
   respectively : 
   
   vAlue=`expr "$1" : '-.\(.*\)`;

   is missing a ' and should read :

   vAlue=`expr "$1" : '-.\(.*\)'`;

   without the ' bash: unexpected EOF while looking for `'' is
   returned.

 - all of the "test" expressions in pclbanner are missing spaces around
   the oerators - the single test expression in psbanner is okay.

   - for example line 27 of pclbanner is given as :
    
    if test "X$vAlue"="X" ; then shift; vAlue=$1; fi; 

    This "always" evaluates to true because = is not interpreted as a
    an operator. This should read :

    if test "X$vAlue" = "X" ; then shift; vAlue=$1; fi;

   - There are six instances in pclbanner like this.  
 
 - With the above changes pclbanner no correctly outputs the Title, Printer,
   Host, User, Class, Jobid, Date, Queue, Printed at etc.

   However even with the above corrections pclbanner registers the following error
   in the status.deslz file while interpreting the PRINTCAP_ENTRY :

BANNER: /usr/libexec/filters/pclbanner: mx#0=1: command not found at 
2000-07-06-11:31:34.713 ## identifier=root@sccode+159 number=159 process=30162

   As recorded
   in /tmp/before(debug file from pclbanner) the PRINTCAP_ENTRY is :
   PRINTCAP_ENTRY=deslz
 :bp=/usr/libexec/filters/pclbanner
 :if=/usr/libexec/filters/ifhp
 :ifhp=model=hp8000,status@
 :lp=deslz%9100
 :mx#0
 :sd=/usr/spool/lpd/deslz

  I followed the logic and yes :

 vAr=`expr "$iI" : " *\:\([^=][^=]*\)=.*"`;
    vAlue=`expr "$iI" : " *\:[^=][^=]*=\(.*\)"`;
    if test "X$vAr" = "X" ; then
      vAr=`expr "$iI" : " *:\(.*\)@"`;
      vAlue=0;
    fi
    if test "X$vAr" = "X" ; then
      vAr=`expr "$iI" : " *:\(.*\)"`;
      vAlue=1;
    fi
    if test "X$vAr" != "X" ; then
      eval $vAr='$vAlue';
      #setvar $vAr "$vAlue"
    fi
 will give this result - I presume you should account for the "#" character
 when parsing the line ?

 A couple of questions :
 - how did this ever work in your setup ? 
 - what shell are you using ?
 - did you see the last question I had in my past posting on the use
   of status@ ?

 Thanks as always.
   
[EMAIL PROTECTED] wrote:
> 
> > From [EMAIL PROTECTED] Fri Jun 30 14:37:42 2000
> > Date: Fri, 30 Jun 2000 16:01:01 -0400
> > From: David Livingstone <[EMAIL PROTECTED]>
> > To: [EMAIL PROTECTED]
> > Subject: Re: [Fwd: LPRng: pclbanner problems from LPRng-3.6.14-1]
> >
> >
> >  Further to my own post :
> >
> >  - the psbanner(sh version) in 3.6.19 exhibits the same problem. The perl
> >    version from 3.6.13 works correctly. I can send whatever debug output
> >    is needed.
> >  - the symbolic link problem does not occur when installing 3.6.18 and
> >    upgrading(freshen) to 3.6.19.
> >
> 
> I just had a horrible thought.  What shell are you using?
> Look and see what the pclbanner has for the #!/bin/sh  value
> at the start.  You may need to specify the shell you want to use.
> 
> If this is not the problem,  please do:
> 
> sh psbanner >/tmp/out
> 
> (note that there are no options).
> 
> does this work?  Does the /tmp/out get a file?
> 
> 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.astart.com)
> 
> -----------------------------------------------------------------------------
> 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.
> -----------------------------------------------------------------------------

-----------------------------------------------------------------------------
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.
-----------------------------------------------------------------------------

Reply via email to