标签:shell
1、
#!/bin/bash for ip in 132 133 134 do name_8808=`nmap -p 8808,15080 172.16.1.$ip |sed -n "5"p|awk ‘{print $2}‘` name_15080=`nmap -p 8808,15080 172.16.1.$ip |sed -n "6"p|awk ‘{print $2}‘` if [ $name_8808 == open -a $name_15080 == open ] then echo "Tomcat$ip is okay!" else echo "Tomcat$ip PCtomcat is $name_8808" echo "Tomcat$ip APPtomcat is $name_15080" fi done
本文出自 “牧羊暗语” 博客,请务必保留此出处http://466716241.blog.51cto.com/1475798/1650719
标签:shell
原文地址:http://466716241.blog.51cto.com/1475798/1650719