天天看点

Linux下通过crontab及expect实现自动化处理 --亲测可用

#!/usr/bin/expect -f

spawn /home/scripts/bckup.sh

expect "Enter password: "  

send "WWQQIE\n"

expect eof

exit

以上这段脚本亲测可用 。