#!/usr/local/bin/expect -f # sync's the web site from seth ws to www.inscoe.org exp_version -exit 5.0 if $argc!=1 { send_user "usage: filename\n" exit } set file $argv # of course these have to be set correctly set user "xxxxxx@xxxxxxxxx@xxxxxxxxxx" set pass "xxxxxxx@xxxxxxxxxx" puts "file = $file" set timeout 60 spawn /bin/ftp ftp.foo.com expect "Name*:" send "$user\r" #expect "password@FW-1-password\rPassword:" expect "331 aftpd:" exec sleep 3 send "$pass\r" expect "ftp>" send "binary\r" expect "ftp>" send "hash\r" expect "ftp>" send "cd docs\r" expect "ftp>" send "put $file\r" expect "ftp>" exit "200*226*ftp>" close