Here is a simple bash script I wrote to allow you to perform a quick ping operation and have it work similar to how it does on Solaris operating systems:
ping -c 1 $args &> /dev/null
case $? in
echo "$host is alive";
echo "no answer from $host";
echo "sping: unknown host $host";
if [ -z $1 ]; then
echo "Usage: sping host"
echo `ping 2>&1 | sed -e 's/ping/sping/'`
#Get hostname from args (in any order)
while test -n "$1"
if [[ "$1" = -* ]]; then
Great little tool when pinging lots of machines at once in a script. The original functionality of the ping command is retained (you can run command line arguements). You can even make this script executable and put it in your /usr/bin folder for easy access.
Casting Machine Bases in Composite Epoxy
1 hour ago