Share

SuperKaramba

The forum address has changed, you have been automatically redirected. Please update any bookmarks to use the new URL.

Subscribe

How to check if a string is empty

You are viewing a single message from this topic. View all messages.

  1. 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.
< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.