#!/bin/sh
ping localhost>p.txt 2>&1 &
i=`wc -l p.txt`
if [ $i -ge "20" ]
then
...£¨¿ÉÒÔÏȺöÂÔÕⲿ·Ö£©
fi
ÌâÄ¿ÊDZàд ping1.sh ³ÌÐò£¬ÒªÇó°üÀ¨ÒÔϹ¦ÄÜ£º
1. ºǫ́ÔËÐÐ ping localhost ÃüÁî¼àÊÓÍøÂçµÄÁ¬Í¨Çé¿ö£»
2. µ±ºǫ́ÔËÐÐµÄ ping ½ø³ÌÊý´óÓÚµÈÓÚ 20 ¸öʱ£¬Í£Ö¹Æô¶¯ÐµĽø³Ì£»
3. µ±ºǫ́ÔËÐÐµÄ ping ½ø³ÌÊýСÓÚ 20 ¸öʱ£¬¿ªÊ¼Æô¶¯ÐµĽø³Ì£¬Ã¿¸ô 2 ÃëÆô¶¯Ò»¸öнø³Ì£»
gh131461 ÓÚ 2013-12-19 20:56:37·¢±í:
¡£¡£¡£¡£
niceؼ ÓÚ 2013-10-04 19:39:06·¢±í:
Ó¦¸ÃµÚËľä°É
niceؼ ÓÚ 2013-08-23 22:05:43·¢±í:
¿´²»¶®
zhangyifei216 ÓÚ 2012-07-19 22:00:26·¢±í:
²»¶Ô°¡
wjh5915 ÓÚ 2012-07-19 14:27:57·¢±í:
¿´²»¶®¡£¡£¡£ÔÎËÀ¡£¡£
g498540170 ÓÚ 2012-07-12 11:49:58·¢±í:
´óÉñ°¡£¬²»¶®
Ïà˼°®ÎÄ ÓÚ 2012-07-03 21:32:40·¢±í:
pgrep ping|wc -l
ÓÃÕâ¸öÃüÁî²é¿´ping ½ø³ÌÊý
Ïà˼°®ÎÄ ÓÚ 2012-07-03 21:30:15·¢±í:
½ø³ÌÊýÖ¸ÔËÐеÄÊýÁ¿£¬²»ÊÇÊä³öÐÅÏ¢µÄ¶àÉÙ
Ò»¸öpingÃüÁ²»¹ÜÊä³ö¶àÉÙÐÐÐÅÏ¢£¬¶¼Ö»ÊÇÒ»¸ö½ø³Ì