|
I tried this and it works a little crude but
#start File
expect -f - <<EOF
spawn scp user@host:smtprelay01.latest.sum smtprelay01.txt
expect "user@host password:"
send "password\r"
spawn scp user@host:smtprelay02.latest.sum smtprelay02.txt
expect "user@host password:"
send "password\r"
spawn scp user@host:smtprelay03.latest.sum smtprelay03.txt
expect "user@host password:"
send "password\r"
#while {1} {expect EOF{break}}
wait
EOF
#end
|