Operating System - HP-UX
1844699 Members
1877 Online
110233 Solutions
New Discussion

Can I stop the print request message?

 
Michelle Alexander
Occasional Contributor

Can I stop the print request message?

After a request is done to print a job on our 11i server, the user always gets the reply:
"request id is 0-104 (1 file)"

Is there a way to stop this?

Thanks,
Michelle
"It's not a bug, it's a feature!"
4 REPLIES 4
A. Clay Stephenson
Acclaimed Contributor

Re: Can I stop the print request message?

Create a wrapper for the lp command and make your wrapper lp command appear earlier in the PATH than /usr/bin/lp.

The idea is to redirect stdout to /dev/null

#!/usr/bin/sh

/usr/bin/lp "$@" > /dev/null
STAT=${?}
exit ${STAT}

If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: Can I stop the print request message?

I should also add that you can simply train your users to use the "-s" lp option or once again create an lp wrapper or an alias to do the same thing but if the lp command is invoked from within an application then the wrapper is the better choice. It gets more tricky if the application actually calls /usr/bin/lp rather than simply lp; in that case, you have to move the lp command and your wrapper becomes /usr/bin/lp.

If it ain't broke, I can fix that.
Rodney Hills
Honored Contributor

Re: Can I stop the print request message?

Put an alias definition to add "-s" option:

alias lp="lp -s"

HTH

-- Rod Hills
There be dragons...
Michael Tully
Honored Contributor

Re: Can I stop the print request message?

The man page of lp gives some good information where it gives an example of the output, and the -s suppress option.
Anyone for a Mutiny ?