redkar has asked for the wisdom of the Perl Monks concerning the following question:
use Expect; my $exp = new Expect; $exp->raw_pty(0|1); $exp->log_stdout(0); $exp->spawn("ssh","servername","ls /"); $exp->expect(2,"-re","connecting"); $exp->send("yes\n"); $exp->expect(10,"-re","password"); $exp->send("password\n"); $exp->expect(0); $read = $exp->before(); $exp->soft_close(); $exp->log_stdout(1); print $read;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: perl Expect
by betterworld (Curate) on Aug 15, 2008 at 13:50 UTC | |
by redkar (Novice) on Aug 15, 2008 at 18:20 UTC | |
|
Re: perl Expect
by Illuminatus (Curate) on Aug 15, 2008 at 23:08 UTC |