944,068 Members | Top Members by Rank

Ad:
Oct 2nd, 2007
0

FireWall Back ups with Expect

Expand Post »
Hello I am about 3 days new to Expect,

I have written a script in expect to automate fire wall back ups. But I want to beable to pull from a list of IPs of the firwalls to telnet to.

then pull the configs to a file and then save the file as the "hostname"month date year-Backup

This is what i have currently and it will save to a specified name. if i specify it.

spawn telnet 10.10.10.2
expect "login:"
Send "user/r"
expect "Password:"
Send "Password/r"
set filename [timestamp -format "Filename fw-%M%D%Y-Backup"]
log_file ./filename.txt

send "get config/r"
expect ">"
Log_file
send "exit/r"



Thank You
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Dnal is offline Offline
1 posts
since Oct 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Shell Scripting Forum Timeline: Comparing 2 files and then apending matches
Next Thread in Shell Scripting Forum Timeline: Help with sed command please.





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC