Operating System - HP-UX
1822818 Members
4237 Online
109645 Solutions
New Discussion юеВ

Enscript error on HP-UX 11.00

 
Ricardo_11
Occasional Advisor

Enscript error on HP-UX 11.00

Hello!
I??ve installed enscript for hp-ux 11. version 1.6.1-11.0.depot with swinstall -s but when I try to print using the command "enscript -P or -d 10_1 (this is my printer name) -q I got the following error:
/usr/bin/lpr: option -P10_1 not recognized. I tried to change the options but I got the same error. Could anybody help me? Thank in advance.
5 REPLIES 5
harry d brown jr
Honored Contributor

Re: Enscript error on HP-UX 11.00

Did you put a SPACE between the "-P" or "-d" and the 10_1 ??


live free or die
harry
Live Free or Die
Jeff Schussele
Honored Contributor

Re: Enscript error on HP-UX 11.00

Ricardo,

lp/lpr does not support the -P & when you use the -d the ptr name MUST immediately follow - no spaces.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Rodney Hills
Honored Contributor

Re: Enscript error on HP-UX 11.00

I'm not familiar with enscript, but if it is trying to run "lpr", that is BSD style printing. HPUX uses system V (lp command).

You might look for an option to use "lp" instead.

-- Rod Hills
There be dragons...
harry d brown jr
Honored Contributor

Re: Enscript error on HP-UX 11.00


Here is "LPR" on hpux:


# cat /usr/bin/lpr



#!/usr/bin/sh
# @(#)B.11.11_LR
# lpr script -- which makes lp look like lpr

options=
files=
remove=false

while [ $# -gt 0 ]
do
case $1 in
-c)
options="$options $1";;
-d*)
options="$options $1";;
-m)
options="$options $1";;
-n*)
options="$options $1";;
-o*)
options="$options $1";;
-r)
remove=true;;
-s)
options="$options $1";;
-t*)
options="$options $1";;
-w)
options="$options $1";;
-*)
echo "$0: option $1 not recognized"
exit 1;;
*)
files="$files $1";;
esac
shift
done

cat $files | lp -s $options

if [ $remove = true ]
then
rm -f $files
fi

So, to get "-P" to work, you need to add it to the LPR script (/usr/bin/lpr)


live free or die
harry
Live Free or Die
Ricardo_11
Occasional Advisor

Re: Enscript error on HP-UX 11.00

Guys. The -P and -d are enscript options and I use them to specify my printer name, after I enter the command I receive the message from the lpr -P10_1 not recognized. Even if I put the printer name with spaces it doesn't work and I don't know how I could make the enscript use the lp instead of the lpr command.
I change the lpr and put -P, then I got the -P option "lp: illegal option -- P".
Well! I'm still needing your help and thank all.