美文网首页
xcall集群执行命令脚本

xcall集群执行命令脚本

作者: 第四风111 | 来源:发表于2018-11-04 16:03 被阅读18次
#!/bin/bash
#查出参数个数
pcount=$#
if((pcount<1)) ; then
echo no args;
exit;
fi
echo ---------- hocalhost -------------
$@
for((host=101;host<103;host=host+1)); do
echo ---------- s$host ----------------
ssh s$host $@
done

相关文章

网友评论

      本文标题:xcall集群执行命令脚本

      本文链接:https://www.haomeiwen.com/subject/buarxqtx.html