分发的测试脚本

#!/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
分享到:

如果您觉得上面的内容对您有帮助,可以打赏支持一下!

打赏

关键词:Linux技术

网友留言(0 条)

发表评论