标签:sync span bin bsp pass eof color chm 安装
[root@root ~]# cat 4.expect
#!/usr/bin/expect set passwd "123456" spawn rsync -av /tmp/1.txt root@192.168.11.18:/tmp/ # 要求两端都安装 rsync expect { "yes/no" { send "yes\r" } "password:" { send "$passwd\r" } } expect eof
[root@localhost ~]# chmod a+x 4.expect [root@localhost ~]# ./4.expect
标签:sync span bin bsp pass eof color chm 安装
原文地址:http://www.cnblogs.com/pzk7788/p/7198499.html