in reply to Re^5: expect.pm header
in thread expect.pm header
I tried to use the $ssh->print_log_file($header); and got a bunch of ^M characters in my log.
M ^[[01m[root@host ~ ]^[[m # hostname^M prdoradb03^M ^[[01m[root@host ~ ]^[[m # uptime^M 3:15pm up 9 day(s), 15:59, 3 users, load average: 5.04, 5.59, 5.3 +2^M ^[[01m[root@host ~ ]^[[m # passwd amagana^M New Password: ^M Re-enter new Password: ^M passwd: password successfully changed for amagana^M ^[[01m[root@host ~ ]^[[m # exit^M logout^M $
$ssh->log_file($filename); $ssh->debug(1); $ssh->print_log_file($header); $ssh->expect ( $timeout, [ qr/Password:/], [ qr/Are you sure you want to continue connecting \(yes\/no\)?/] );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: expect.pm header
by sn1987a (Curate) on Apr 08, 2015 at 04:02 UTC | |
by amagana (Acolyte) on Apr 08, 2015 at 15:42 UTC | |
by sn1987a (Curate) on Apr 08, 2015 at 17:04 UTC | |
by amagana (Acolyte) on Apr 08, 2015 at 18:19 UTC | |
by sn1987a (Curate) on Apr 08, 2015 at 18:30 UTC | |
|