1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
[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]
#
|
本文转自 小小三郎1 51CTO博客,原文链接:http://blog.51cto.com/wsxxsl/1924277,如需转载请自行联系原作者