<span style="font-family:Microsoft YaHei;">#!/usr/bin/expect
set password "qwertyuiopN"
set date [exec date -d yesterday "+%Y%m%d"]
cd /www/files/
spawn scp -P 22 DM_OS_TESTSPEED$date.txt root@172.16.244.3:/www/transferspeed_zw/files/
set timeout 300
expect "root@17.16.24.3's password: "
set timeout 300
send "$password\r"
set timeout 300
send "exit\r"
expect eof</span>
expect学习笔记
最新推荐文章于 2019-06-14 01:13:47 发布