#!/usr/local/bin/expect -f spawn telnet myCisco.myOrg.com expect "Password" send "myPass\r" expect ">" send "enable\r" expect "Password" send "myEnPass\r" expect "#" send "copy startup tftp\r" expect "host" send "10.10.10.10\r" expect "startup" send "\r" expect "#" send "logout\r"