[root@CentOS-64-462-C1 sync]# ls
sync2remote_ex_rules.txt sync2remote.sh
[root@CentOS-64-462-C1 sync]# cat sync2remote.sh
#!/usr/bin/expect -f
set timeout 20000
spawn rsync -aLvpz --progress --port=8773 --delete --exclude-from=/home/sync/sync2remote_ex_rules.txt /home/buildagent/workspace/root/mjzw/branch/SyncVersionToRemote/ac-release/gameserver/ liuzhibiao@203.195.188.191::gameserver
expect {
"*Password:*" {send "rcAc!zHuHai56\r"}
}
expect ".*\\@.*#"
[root@CentOS-64-462-C1 sync]#
sync2remote_ex_rules.txt sync2remote.sh
[root@CentOS-64-462-C1 sync]# cat sync2remote.sh
#!/usr/bin/expect -f
set timeout 20000
spawn rsync -aLvpz --progress --port=8773 --delete --exclude-from=/home/sync/sync2remote_ex_rules.txt /home/buildagent/workspace/root/mjzw/branch/SyncVersionToRemote/ac-release/gameserver/ liuzhibiao@203.195.188.191::gameserver
expect {
"*Password:*" {send "rcAc!zHuHai56\r"}
}
expect ".*\\@.*#"
[root@CentOS-64-462-C1 sync]#