2009-05-12 07:08:46 UTC
Steven: I am already using "-c" and "-w" for pinging. The command above
ping -c1 -w3
http://www.whatismyip.com | grep 'unknown host'
does exactly what you mentioned and what I want: the "-c1" tells ping to send only one ping and "-w3" tells ping to wait no longer than three seconds for a response. And if the network is down or the host is not reachable, the result will contain the words "'unknown host", which are caught by grep.
Now I need to know how to check for an empty string within a theme-file. The option "-z" for the test doesn't work. It works in a shell script, but not in a theme file.