#!/usr/bin/expect -f
##############################################
spawn telnet 192.168.1.215
expect "login:"
send "root\n"
expect "Password:"
send "mmmmm\n"
expect "root@CRong:/#"
send "cat /app/bin/app_init\n"
expect "root@CRong:/#"
send "cat /etc/my.cfg\n"
expect "root@CRong:/#"
send "cat /app/cfg/setsql.sh\n"
expect "root@CRong:/#"
send_user "\n\nOver\n\n"
interact
##############################################
##############################################
spawn telnet 192.168.1.215
expect "login:"
send "root\n"
expect "Password:"
send "mmmmm\n"
expect "root@CRong:/#"
send "cat /app/bin/app_init\n"
expect "root@CRong:/#"
send "cat /etc/my.cfg\n"
expect "root@CRong:/#"
send "cat /app/cfg/setsql.sh\n"
expect "root@CRong:/#"
send_user "\n\nOver\n\n"
interact
##############################################