You could wait for the next prompt after having issued the listdev command, and then print out the accumulated buffer contents, accessible via before(). Something like
... print $ssh "listdev\n"; unless ($ssh->expect(10,"sysadmin>")) { die "listdev command never finished, " .$ssh->exp_error()."\n" +; } my $out = $ssh->before();
In reply to Re: Expect.pm question
by almut
in thread Expect.pm question
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |