57.自动登录脚本

发表于 linux 分类,标签:
#!/bin/bashdata=`date +%F`/usr/bin/expect <<-EOFset time 30spawn scp root@120.55.46.175:/data/mysql_backup/$data.sql.gz  /data/bigmysql/big175expect {"*yes/no" { send "yes\r"; exp_continue }"*password:" { send "H8^eD4^kE5!h\r" }}expect eof...