. ~/.bash_profile
passwd='xxx'
expect <<!
set timeout -1
spawn rsync -avH /webapps/Seeyon/A8/base/upload/ root@120.26.93.217:/webapps/Seeyon/A8/base/upload/
expect {
"(yes/no)?" {
send "yes
"
expect "password:"
send "$passwd
"
}
"password:" {
send "$passwd
"
}
}
expect eof
exit
!