分发的测试脚本
#!/bin/sh . /etc/init.d/functions if [ $# -ne 2 ] then echo "USAGE:/bin/sh args1 args2" exit 1 fi for n in 103 104 do scp -P22 $1 shnne@192.168.1.$n:~ &>/dev/null ssh -p22 -t shnne@192.168.1.$n sudo cp ~/$1 $2 >/dev/null 2>&1 if [ $? -eq 0 ] then action "$1 to 192.168.1.$n$2 is ok" /bin/true else aciton "$1 to 192.168.1.$n$2 is no" /bin/false fi done
如果您觉得上面的内容对您有帮助,可以打赏支持一下!
<< 上一篇
下一篇 >>
网友留言(0 条)