The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 11-06-2001
ahibbitts ahibbitts is offline
Registered User
 

Join Date: Nov 2001
Location: Washington
Posts: 5
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
Reply With Quote