This script checks if a remote host is up (or at least answering to ping)
-
#!/bin/bash
-
ping -c 1 $1>/dev/null 2>&1
-
if [ "$?" = "0" ]; then
-
echo -n "up"
-
else
-
echo -n "down"
-
fi
Related posts
Metastuff
No Comment yet
No comments yet. You could get "First Post!" which would bring you fame, luxury cars and chicks.
This entry "Online check script" was posted on 02/02/2004 at 10:21 pm and is tagged with Bash, Code, Linux
Watch this discussion : Comments RSS 2.0. You can trackback this post from your own site