天天看點

Linux下通過crontab及expect實作自動化處理 --親測可用

#!/usr/bin/expect -f

spawn /home/scripts/bckup.sh

expect "Enter password: "  

send "WWQQIE\n"

expect eof

exit

以上這段腳本親測可用 。