#!/usr/bin/expect
spawn telnet <ServerName>
expect "login:"
send "<UserName>\n"
expect "password:"
send "<Password>\n"
send "pwd\n"
send "ls -lrt\n"
send "exit\n"
interact
spawn telnet <ServerName>
expect "login:"
send "<UserName>\n"
expect "password:"
send "<Password>\n"
send "pwd\n"
send "ls -lrt\n"
send "exit\n"
interact
No comments :
Post a Comment