#File Name: scriptv2.exp
#!/usr/bin/expect --

set timeout 5
set prompt "(%|#|\\$) $" ;
catch {set prompt $env(EXPECT_PROMPT) }

puts "Telnet into Home Agent Access Point"
set tpid1 [ spawn telnet 120.10.10.100 ]
expect "]:"
send "=\r"
expect "]:"
send "s\r"
expect "]:"
send "ex\r"
expect "]:"
send "ra\r"
expect "):"
send "home\r"
expect "]:"
sleep 1
send "apply\r"

exec kill -9 $tpid1





    Source: geocities.com/shezy22/code/forjames

               ( geocities.com/shezy22/code)                   ( geocities.com/shezy22)