Hello, The following line in a bash shell script:
code:===================================== if ping -c 1 $GATEWAY &> /dev/null code:===================================== Will return "true" (execute the following code) if the ping response is reasonable and "false" if the ping times out. What if the count is increased? What is the behavior of the following command: code:===================================== if ping -c 2 $GATEWAY &> /dev/null code:===================================== If 1 ping is a time out but the other responds, does it return "true"? What if the count is three pings, and only one response and two timeouts results? I get the feeling it's a simple case of whether or not even one of the ping responds (count 10, even if 1 responds and 9 timeout, it returns true) but I wanted to get a definitive answer. Thanks, Brian -------------------- BYU Unix Users Group http://uug.byu.edu/ The opinions expressed in this message are the responsibility of their author. They are not endorsed by BYU, the BYU CS Department or BYU-UUG. ___________________________________________________________________ List Info (unsubscribe here): http://uug.byu.edu/mailman/listinfo/uug-list
