This is a discussion on expect about helps pls within the Shell scripting forums, part of the Development/Scripting category; Hi , Could you help me please. i want backup all cisco routers with sheel script. So i wrote a ...
|
|||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
|||
|
Hi ,
Could you help me please. i want backup all cisco routers with sheel script. So i wrote a script. Can i into 3. password info asking try with sheel script. ? i can not use to 3. password info with expect. Just i can use two expect Regards, set timeout 100 match_max 1000000 set router [lindex $argv 0] spawn telnet $router expect { "Password" { send "*******\r" expect ">" send "en\r" expect "Password" send "******\r" } "Username" { send "*****\r" expect "Password" send "*****\r" } } send -- "term len 0\r" expect "*#" send -- "show run\r" expect "*#" send -- "term leng 50\r" expect "*#" send -- "exit\r" expect "closed*host.\r" expect eof |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| interacting with expect | monteo7 | Shell scripting | 1 | 03-04-2008 04:42 PM |
| Expect and tcl - manymaint.exp script | Intelligen | Shell scripting | 11 | 11-21-2007 02:48 PM |