#!/bin/bash
IP_PORT="
10.11.XXX.177 23306
10.11.XXX.101 1529
。。。。
"
#检查
echo “KaTeX parse error: Expected group after '^' at position 22: …T" | grep -Ev "^̲” |
while read line;do
echo “$line” | grep -qE “^#”
if [ ?−eq0];thenecho"? -eq 0 ];then
echo "?−eq0];thenecho"line"
continue
fi
#normal line with ip and port
connectFlag=“DOWN”
nc -z -w 1 $line
if [ $? -eq 0 ];then
connectFlag=“UP”
fi
printf “%-20s %5s %5s\n” $line $connectFlag
done
2016

被折叠的 条评论
为什么被折叠?



