Re: Error message 'prinf: missing format character'

From: Ludek Frybort (frybort_at_amit.cz)
Date: 02/18/04


Date: Wed, 18 Feb 2004 15:58:29 +0100

Michael Green wrote:
>
> I am using the hpif interface file found in the 'printing' section of
> handbook:
>
> printf "\033&k2G" && cat && printf "\033&l0H" exit 0
> exit 2
>
> It works OK, in that my Laserprinter (HP 4v) prints pages correctly
> formatted, but gives this error message.
>
> Can anyone spot the mistake?
 
I think there should be another && between "\033&l0H" and exit 0.
As it is, exit 0 isn't parsed as a command, it is instead passed to
printf as two more arguments. And since there are no formating
specifiers for the arguments in the format string, the extra arguments
are ignored, just the warning is isuued and exit 2 is executed.
 
HTH,
Ludek



Relevant Pages