Operating System - HP-UX
1836460 Members
2491 Online
110101 Solutions
New Discussion

Re: Error code prints on job

 
scott_170
Occasional Advisor

Error code prints on job

/etc/lp/interface/lp80[97]: test: Specify a parameter with this command.

This is:
HP-UX B.10.20 D 9000/861 2011712250 64-user license.

This is a serial printer attached to a concentrator.

Thanks
4 REPLIES 4
Patrick Wallek
Honored Contributor

Re: Error code prints on job

What command did you run that generated this error?
Bill Douglass
Esteemed Contributor

Re: Error code prints on job

Check the script /etc/lp/interface/lp80 for an if statement that uses an unquoted variable:


if [ -z $VAR ]


In such a command, the test command (the part from [ to ]) requires a parameter for the comparison. If the variable VAR is empty (or undefined) then the test command evaluates to

if [ -z ]

which results in the syntax error you are seeing.

You can also put

set -x

at the top for your script to get debugging info printed out.
Bill Hassell
Honored Contributor

Re: Error code prints on job

Look at line 97 of /etc/lp/interface/lp80 and you'll see an if statement. You'll have to backtrack to see why the test is incomplete, but as mentioned, an undefined variable will cause this problem. lp80 doesn't seem to be a standard lp script so it must have been custom-written.


Bill Hassell, sysadmin
scott_170
Occasional Advisor

Re: Error code prints on job

The interface script is the "dumb" script.

The command I ran was just
lp -dlp80 test (A text test page I created) Any print to it produces this.

I couldn't find the variable in question.

I am not as familiar with HP-Unix as others (SCO, AIX). So I created this printer thusly:

I created the "spool" (via SAM) then checked it's major/minor numbers took those and created the device /dev/lp80.

Thanks Scott