Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^21: expect.pm header

by sn1987a (Chaplain)
on Apr 10, 2015 at 15:39 UTC ( #1123048=note: print w/replies, xml ) Need Help??


in reply to Re^20: expect.pm header
in thread expect.pm header

I am sorry to hear about your son. I hope he is feeling better today.

You are just missing the call to print_log_file. Find the place in your code where you have:

my $my_header = $header; $my_header =~ s/system/$system/; $ssh->expect ( $timeout,
and add the line as shown below:
my $my_header = $header; $my_header =~ s/system/$system/; $ssh->print_log_file($my_header); # This line needs to added here <<<< +<<< $ssh->expect ( $timeout,

Replies are listed 'Best First'.
Re^22: expect.pm header
by amagana (Acolyte) on Apr 10, 2015 at 19:14 UTC

    Thank you! I can see the header now I just need to practice more with how to format in perl I really want to do that well.

    This is what my header looks like in my log file and you can now see where the header is, I really thank you for your help I learn by seeing working examples and then analyze how it works.

    $ ^M ^M ======= remotehost03 =======^M ^M You are accessing a U.S. Government (USG) Information System (IS)

    Oh! I was wondering is it possible to get my script to die if the password is not the right one initially and just keep going to the next box? And it reports to me a list of servers that failed but the script still keeps going?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1123048]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2019-04-20 13:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I am most likely to install a new module from CPAN if:
















    Results (109 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!