#!/bin/bash #vim ip.txt server ip ip_array=$(cat /tmp/ip.txt) user="root" passwd="password" remote_cmd="/tmp/test.sh" port=6122 for ip in ${ip_array[*]} do ssh -t -p $port $user@$ip $remote_cmd done
shell 脚本远程执行脚本
原创bard_zhang 博主文章分类:Linux ©著作权
©著作权归作者所有:来自51CTO博客作者bard_zhang的原创作品,请联系作者获取转载授权,否则将追究法律责任
上一篇:shell 脚本远程复制文件
下一篇:linux系统之间复制文件
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
动态执行脚本
提到动态执行脚本,大家想到的肯定是 eval 或 new Function(),在 nodejs 中有专属的 vm 模块,可以完成相应的 sandbox
nodejs vm eval Function 动态执行脚本 沙箱