#!/usr/tcl/bin/expect -f
for {set i 14} {$i < 24} {incr i} {
spawn ssh root@192.168.4.$i
expect {
"*password:*" {
send "123456\r"
exp_continue
}
"*yes/no)?*" {
send "yes\r"
exp_continue
}
}
expect "]# "
send "rm -rf /usr/hdp/2.5.3.0-37/spark2/work/*\r"
send "exit\r"
expect eof
}
linux定时删除日志脚本功能
最新推荐文章于 2024-05-28 21:09:25 发布