1847163 Members
6073 Online
110263 Solutions
New Discussion

lprpp command and FIFO

 
SOLVED
Go to solution
Matthew Pegge_1
Frequent Advisor

lprpp command and FIFO

I'm trying to work out what an historic script we use does. However I have come across the following line that I do not understand?

/usr/lbin/lprpp $FIFOO

Especially the FIFO bit? Any helpwould be much appreciated.
9 REPLIES 9
Paul Sperry
Honored Contributor

Re: lprpp command and FIFO

lprpp
This is a filter that converts backspace overstrike to line overprint
with horizontal print positioning to enhance bold print. This
functionality is required on printers such as the LaserJet, which
cannot produce bold print by overstriking.

$FIFO
In computer programming, FIFO (first-in, first-out) is an approach to handling program work requests from queues or stacks so that the oldest request is handled next. LIFO (last-in, first-out) is an approach in which the most recent request is handled next and the oldest request doesn't get handled until it is the only remaining request on the queue (or in the stack). Although LIFO seems "unfair," it may be more efficient. A stack that is handled using LIFO is sometimes referred to as a push-down or push-down pop-up stack or list.

Other than that you got me!

Frank Slootweg
Honored Contributor

Re: lprpp command and FIFO

Adding to Frank's response:

lprpp has a manual page: lpfilter(1) (or just do a "man lprpp").

What is $FIFO set to? There is probably an earlier command which sets $FIFO to some value. It is probably a named pipe (see mknod(1M)). A named pipe is similar to a normal pipe, but, as the name implies, it has a name and, normally, is permanent instead of temporary. Like normal pipes, you can use one process to write to the pipe and one process to read from it.
Matthew Pegge_1
Frequent Advisor

Re: lprpp command and FIFO

Thanks guys... that clears up the lprpp bit. The $FIFO but is still a mystery. I have looked in the script for mention of it and there in no other reference. I also put a trap in to echo the $FIFO to a file and there was no value.

The search continues!
Frank Slootweg
Honored Contributor

Re: lprpp command and FIFO

Does it really say "$FIFO", not just "FIFO"? I ask because you made another typo (two O's) and it is easy to think/assume that an uppercase 'word' is a variable when it is actually not.

Care to post the script?
Matthew Pegge_1
Frequent Advisor

Re: lprpp command and FIFO

Hi guys.... I'm really sorry to have messed you about like this. it actually says :

$FIFOO

???
Frank Slootweg
Honored Contributor

Re: lprpp command and FIFO

Please post the script (if you can). Perhaps we see something which you do not.
Matthew Pegge_1
Frequent Advisor

Re: lprpp command and FIFO

Here you go guys... the script is a bit crazy! I'd ideally like to replace it but it has proved troublesome to date!
Frank Slootweg
Honored Contributor
Solution

Re: lprpp command and FIFO

Apparently this script expects that the variable FIFOO is already set in the environment before it (the script) is invoked.

Environment variables are normally set in things like /etc/profile, ~/.profile, etc., so I advise to look there, especially in old versions of those files.

How and by whom (i.e. which user) is this script invoked?

In the script, $FIFOO is used as one of the options (i.e. not parameters) for lprpp. But I do not seem an lprpp option for which FIFOO is a logical name.

Apparently this script is *based on* a very old version of the HP model/PCL5 model script, i.e. a component of the LP spooler system, but it looks like it is *used* outside the spooler.
Matthew Pegge_1
Frequent Advisor

Re: lprpp command and FIFO

Frank,

Thansk for your help. Bit of background for you. This fiel was used as an interface filter when we used HP's Openspool. However we are currently migrating to another spooler called UniQ... basically when a print job gets submitted to UniQ with a certain option it uses the PCL5 filter file to add some formatting such as margins.

Ideally I'd like to replace this with a new filter that I completely understand, as like you say this is quite old!