jdelmedico has asked for the wisdom of the Perl Monks concerning the following question:
$telnetobj = new Net::Telnet->new(Timeout => 120, Prompt=> '/X>/', Binmode => 1, Errmode => "return", Output_record_separator => "\n", Input_log => $file_log); $telnetobj->open($HOH{$JOB}{Node}); $telnetobj->prompt('/login: /'); $telnetobj->print(''); #add one <CR> to display login my $loginpmpt = '/login: /'; $telnetobj->waitfor($loginpmpt); $telnetobj->print($HOH{$JOB}{'Login'}); $telnetobj->waitfor('/Password:/'); $telnetobj->print($HOH{$JOB}{"Password"}); $telnetobj->prompt; $telnetobj->waitfor(/X>/); $telnetobj->prompt(); $telnetobj->print("who"); $telnetobj->put(); my @stuff = $telnetobj->cmd("cat $filename"); $telnetobj->waitfor(/X>/); $telnetobj->close; ## close telnet session");
holli fixed formatting
jdporter fixed formatting even more
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: unix cat
by davidrw (Prior) on Feb 09, 2006 at 14:01 UTC | |
by jdelmedico (Initiate) on Feb 09, 2006 at 14:03 UTC | |
|
Re: unix cat
by Roy Johnson (Monsignor) on Feb 09, 2006 at 15:10 UTC | |
|
Re: unix cat
by jcc (Sexton) on Feb 09, 2006 at 16:30 UTC | |
by jdelmedico (Initiate) on Feb 10, 2006 at 12:38 UTC |