Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

supress STDOUT from lp system command

Status
Not open for further replies.

shazzbot

Programmer
Dec 6, 2004
1
US
How can I supress the stdout from the "lp" command which is being run through a perl-cgi script? If i run the command from the bash prompt (hardcoding filename rather than variable used below), it does as expected and redirects the standard output to /dev/null, *not* outputting the usual "request id is plothp-XX". When it is run from the perl-cgi script, I end up with "request id is plothp-XX" at the top of the webpage. How can i discard this output?
-------------------------------------------------------
this is the command I am using from within the perl script:

system ("lp -d plothp -o position=bottom-left -o PageSize=w1728h2160 $linuxPath 1>/dev/null");

my HTTP header is:

print "Content-type: text/html","\n\n";
--------------------------------------------------------
 
search here for select and Stdout, it came up a while ago, also try the perl forum

HTH
--Paul

Nancy Griffith - songstress extraordinaire,
and composer of the snipers anthem "From a distance ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top