ssh 远程删除
expect -c "
spawn ssh -t user@IP rm -fr ~/daily_binary/dailybuildapks/*
expect {
\"*assword\" {set timeout 300; send \"password\r\";}
\"yes/no\" {send \"yes\r\"; exp_continue;}
}
expect eof"
scp 远程拷贝
expect -c "
spawn scp -r /home/jenkins/ [email protected]:~/daily_binary/dailybuildapks/
expect {
\"*assword\" {set timeout 300; send \"password\r\";}
\"yes/no\" {send \"yes\r\"; exp_continue;}
}
expect eof"