Disclaimer: I haven't used Control::CLI before.
With '->cmd()' it seems like you can't. But the documentation says '->cmd()' is equivalent to
$obj->read(Blocking => 0); $obj->print($cliCommand); $output = $obj->waitfor($obj->prompt);
so you may be able to replace the call to cmd() with something like this:
This code fragment is totally untested. I just wanted to give you an idea.$obj->read(Blocking => 0); $obj->print($cliCommand); while (not $obj->prompt) { my $inc_output = $obj->read(Blocking => 0); if (defined $inc_output) { print $inc_output; $s1_output .= $inc_output; } sleep 1; } (process output in $s1_output)
In reply to Re: Call external script via ssh with Control::CLI, get output to calling script window
by Monk::Thomas
in thread Call external script via ssh with Control::CLI, get output to calling script window
by ImJustAFriend
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |