[root@db01-51 scripts]# cat check_web3.sh #!/bin/bash if [ "`curl -s www.baidu.com|egrep "百度一下"|wc -l`" = "1" ] then echo "httpd is running" else echo "httpd is stopped" fi