walter valenti wrote:
> 
> Hi,
> 
> i've got a binary executable file, that give a result on STDOUT (shell).
> I'm reditected STDOUT on a file as:
> 
> use Getopt::Long;
> open(STDOUT,">/usr/local/netsaint/var/tmp") || die"$!\n";
> &GetOptions("p=i" => \$port);
> $|=1;
> system("/usr/local/netsaint/libexec/check_http 127.0.0.1 -p $port");
> close(STDOUT);
> 
> where check_http is the executable.
> 
> After i read and parse the content of this file, i want give a result on
> STDOT (shell), but...
> 
> I don't write more on shell !!!
> 


are you sure this executable prints to stdout, not stderr?

does these commands give the same output (on shell):
/usr/local/netsaint/libexec/check_http 127.0.0.1 -p some_port > std_out
/usr/local/netsaint/libexec/check_http 127.0.0.1 -p some_port 2> std_err

if not, it prints to stderr and it's stderr you need to redirect STDERR
to the file.

or you can do:
system("/usr/local/netsaint/libexec/check_http 127.0.0.1 -p $port
2>&1");

/Jon


> I'm tryied only with on print, and with:
> 
> select STDOUT;
> $|=1;
> print"xxx";
> 
> Nothing... i don't write on shell !!!
> 
> How i can reallocate the STDOUT on default (shell) ????
> 
> Thanks
> 
>     Walter
> 
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  • STDOUT walter valenti
    • Jon Molin

Reply via email to