I am trying to write one script that rises from one system to another through TCL / Expect. He works for me. I need a regular expression in which to expect "$" and expect "#" , so any system with any prompt in transit may be included.
#!/usr/bin/expect # Using ssh from expect log_user 0 spawn ssh test@192.168.2.24 expect "sword: " send "test\r" expect "$ " send "ssh beta\r" expect "# " send "uptime\r" expect "# " set igot $expect_out(buffer) puts $igot
regex tcl expect
Harikrishnan r
source share