On Thu, 18 Apr 2013 16:25:44 -0700 (PDT), contracer wrote:
> Could you please put these commands in the example´s script ?
-----8<-----8<-----8<--- cut below this line ----8<-----8<----
#!/usr/bin/expect -f
#*********************************************
#* ip_address - send ip address
#*
#* Usage: ./ip_address x.x.x.x
#* Example: ./ip_address 200.244.20.10
#*
#*********************************************
log_file -noappend /tmp/sftp.log
set ip_addy [lindex $argv 0]
spawn sftp sword@$ip_addy
expect "ip_address:"
send "$ip_addy\r"
expect "sftp>"
sleep 1
send "bye\r"
#*********************** end ip_address *********************