码迷,mamicode.com
首页 > 系统相关 > 详细

shell小知识

时间:2017-05-11 09:21:27      阅读:144      评论:0      收藏:0      [点我收藏+]

标签:shell

[root@DBBK1 changeIP]# cat view.sh 
#!/bin/sh
if [ $# -ne 1 ];then
    echo "USAGE:/bin/sh $0 ARG1"
    exit 1
fi
for n in `cat ip.txt`
do
  echo =======172.22.10.$n========
  ssh  root@172.22.10.$n "$1"
done
[root@DBBK1 changeIP]# cat   ip.txt 
100
101
102
103
106
[root@DBBK1 changeIP]#

本文出自 “砖家博客” 博客,请务必保留此出处http://wsxxsl.blog.51cto.com/9085838/1924277

shell小知识

标签:shell

原文地址:http://wsxxsl.blog.51cto.com/9085838/1924277

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!