Hi guys,
I have a piece of code that executes a command at a remote server
and writes the output to stdout. It there a wat to write stdout as it
is being written and not have to wait for it to be completed.
I know it's kinda hard to understand but here is the portion of
code:
<code>
use Net::SSH::Perl;
my $remote_ip = "192.168.123.5";
my ($out, $error, $exit) = $ssh->cmd("cd /home; for i in *; do echo
\$i; tar cpvf - \$i/ | ssh $remote_ip \'tar -C /home -xpf -\';done");
</code>
how can I write $out as it is being executed. and not after everything
is completed?
I hope that explains it better..
Thanks,
Chad
signature.asc
Description: This is a digitally signed message part
