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"
fiThis 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