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 Chriss Miller 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
Joined
Dec 6, 2004
Messages
1
Location
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 ...
 
another option could be something like IPC::Open2

________________________________________
Andrew

I work for a gift card company!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top