shell加python加expect更改设备密码并邮件通知 #!/bin/bash i=$(cat /dev/urandom | head -n 10 | md5sum | head -c 10) echo $i >> /data/1.log 2>&1 expect test.expect $i >> /data/1.log 2>&1 sleep 3 pyt
shell加python的ping监控到目的主机情况 #!/bin/bash set -u test=`ping -c 10 10.140.143.153 | grep "packet loss" | awk {'print $6'} | awk -F% {'print $1'}` #test=1 while (("$test" /dev/null t