Michael Loßin on Tue, 13 Feb 2001 13:36:37 +0100 (CET)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: bug in SETUP


John Reynolds wrote:
> 
> While installing the latest apsfilter port, I came across this:
> 
>     ======================================================================
>                     Filter installation -- final steps
>     ======================================================================
> 
> It's recommended to have one 'raw' entry for each physical printer.
> If you're not sure, say 'y' -- it won't hurt.
> 
> Do you want me to create one for printer at /dev/lpt0? (y/n) y
> 
> expr: non-numeric argument

Wierd... This shouldn't happen. Does your shell have an
internal "expr" command that acts strangely?

Maybe the shell doesn't know the variable substitution
"${FOO##*bar}" which removes the longest prefix ending
with "bar".

What happens if you enter this:

	$ FOO=`grep "APS.*_BEGIN" /etc/printcap | sort -n`
	$ echo $FOO
	$ echo ${FOO##*printer}

> 'expr' is being used somewhere in the SETUP script right after the 'raw'
> entry is asked about and it isn't being called right. Sorry, no time to debug
> and send a patch, but it certainly doesn't look right.

Maybe your printcap file is messed up. Each printer
definition should start with a line similar to

# APS42_BEGIN:printer42

with no other characters after the last number.


HTH

Michael