Re: Running a shell command inside a cgi/perl script

2001-11-30 Thread Brian Reichert
Just to toot my own horn, I'd like to mention that I wrote the System2 module, with an eye toward running commands, and getting isolated STDOUT/STDERR as well as exit values. Well, it makes me happy. On Fri, Nov 30, 2001 at 03:45:23PM -0500, J. J. Horner wrote: > * Kairam, Raj ([EMAIL PROTECTED]

Re: Running a shell command inside a cgi/perl script

2001-11-30 Thread Medi Montaseri
Use the CHILD_ERROR $? to see what happend, for example system(" some command "); if ( $? ) { then figure out what happend.. } Note that you'll have to see what your command returns and parse that. See perlvar(1), there is some shifting around to be done as well. But I am not sure

Re: Running a shell command inside a cgi/perl script

2001-11-30 Thread Balazs Rauznitz
On Fri, Nov 30, 2001 at 03:08:16PM -0500, Kairam, Raj wrote: > In my perl script I have a line like this. > system( "'/usr/bin/lp -dhp4si /tmp/plotreq.txt' > /tmp/plotid.txt"); > > hp4si is the destination printer. > /tmp/plotreq.txt is small text file to be sent to the printer. > /tmp/plotid.tx

Re: Running a shell command inside a cgi/perl script

2001-11-30 Thread Rodney Broom
From: Kairam, Raj <[EMAIL PROTECTED]> > system( "'/usr/bin/lp -dhp4si /tmp/plotreq.txt' > /tmp/plotid.txt"); > If I run the command /usr/bin/lp -dhp4si /tmp/plotreq.txt > /tmp/plotid.txt > it is fine as a command line. I may be missing something, but it looks to me like you are running a differe

Re: Running a shell command inside a cgi/perl script

2001-11-30 Thread J. J. Horner
* Kairam, Raj ([EMAIL PROTECTED]) [011130 15:10]: > In my perl script I have a line like this. > system( "'/usr/bin/lp -dhp4si /tmp/plotreq.txt' > /tmp/plotid.txt"); > > hp4si is the destination printer. > /tmp/plotreq.txt is small text file to be sent to the printer. > /tmp/plotid.txt is the ou

Running a shell command inside a cgi/perl script

2001-11-30 Thread Kairam, Raj
In my perl script I have a line like this. system( "'/usr/bin/lp -dhp4si /tmp/plotreq.txt' > /tmp/plotid.txt"); hp4si is the destination printer. /tmp/plotreq.txt is small text file to be sent to the printer. /tmp/plotid.txt is the output of lp command ( just one line to indicate job id )to be s