anshumangoyal has asked for the wisdom of the Perl Monks concerning the following question:
Now my problem is when I send command and wait for expect I want whatever is coming back from the remote machine is captured/printed immediately on screen. If I use $telnet->before() it returns me whole content but that is not real time and I get this variable only after expect block has executed. In other words, I want the expect buffer to flush out immediately as there is some content in it to see the command response in real time. If any one is not able to understand please let me know.use Expect; #Let's assume I am logged in to the Remote machine and $telnet is my E +xpect Handler. my $timeout = undef; my $prompt = "> "; $telnet->send("$command"); $telnet->expect($timeout, '-re', $prompt);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Expect Real Time Logs
by sauoq (Abbot) on May 03, 2012 at 12:33 UTC | |
|
Re: Expect Real Time Logs
by Anonymous Monk on May 03, 2012 at 07:41 UTC | |
by sauoq (Abbot) on May 03, 2012 at 12:40 UTC | |
by anshumangoyal (Scribe) on May 03, 2012 at 07:48 UTC | |
by Anonymous Monk on May 03, 2012 at 07:58 UTC | |
by anshumangoyal (Scribe) on May 03, 2012 at 08:58 UTC |