bash: check for network

Justin Gedge jgedge at
Fri Apr 15 11:17:12 MDT 2005

This is where you get back to the whole mess of using grep.  You don't 
want to check wether ping ran or not-- you want to check what the 
results of ping were.  Pipe the results of ping through grep-- and 
filter on " 0%" or  " 100%".  Also-- putting the -w for timout is good 
too-- otherwise ping may sit there for quite a while.  I figure-- on a 
good network [locally] if your ping is over 1s there are other problems 
at large.

justin gedge

Dan Wilson wrote:

>On Thu, 2005-04-14 at 15:41 -0600, C. Ed Felt wrote:
>>If you add ">> /pathToSomeLogFile" or even "> /pathToSomeLogFile" (if 
>>you don't want to track this) at the end of your cron command you can 
>>avoid those annoying emails.  This makes cron save what it normally 
>>emails you to a log file.
>But I want to know when the process has errors/output not associated
>with no connection.  So this doesn't work for what I want.
>| This has been a P.L.U.G. mailing. |
>|      Don't Fear the Penguin.      |
>|  IRC: #utah at   |

More information about the PLUG mailing list