r_expect.sh:
#!/bin/expect -f
set timeout 30
#spawn rsync -avz --delete --exclude-from=exclude.list -e "ssh -i /home/user/.ssh/key" user@192.168.1.20:/home/htdocs/www.abc.com /home/backup/code/
spawn /bin/rsync -avz --delete --exclude-from=/log/microchat/rsync/rsync_exclude /log/microchat/ lottery@103.30.4.144:/www/log/im/
#expect "Enter passphrase for key '/home/user/.ssh/key':"
expect "103.30.4.14's password:"
send "lottery2018 "
#interact
set timeout 60
expect eof
exit