[nycbug-talk] To ping or not to ping, that is the question...

Isaac Levy ike at lesmuug.org
Sat Jul 8 08:46:51 EDT 2006


Hi Ray,

On Jul 8, 2006, at 8:02 AM, Ray Lai wrote:

> Just do:
>
> ray at x[~] COUNT=1; WAIT=1; ping -c "$COUNT" -w "$WAIT" google.com >/ 
> dev/null && echo success || echo fail
> success
> ray at x[~] COUNT=1; WAIT=1; ping -c "$COUNT" -w "$WAIT" 10.0.1.9 >/ 
> dev/null && echo success || echo fail
> fail
>
> Unfortunately the -w flag only accepts integers, so the lowest
> timeout you can set is one second.
>
> -Ray-

Thanks, I can now say that Ray Lai taught me to ping.

Problem: the wait function seems to not have much affect, if I ping  
an address I know doesn't exist, it still takes an indeterminate  
amount of time to return the failure...

Hrm.  I think I can hack this nicely now though.  Thanks!

Rocket-
.ike





More information about the talk mailing list