#!/bin/bash

checkhost()
{
		printf "$1: "
		res=`ping -c 1 $1 2> /dev/null | grep 64 | wc -l`
		if [ $res == "1" ]; then
				echo "up"
		else
				echo "DOWN"
		fi
}

HOSTS=$*

while [ "1" == "1" ]; do
		for host in $HOSTS; do
				checkhost $host
		done
		sleep 1
		clear
done