Monday, October 19, 2009

To check desire machine status for up or down by IP address using ping test

#!/bin/bash
#Author- Deepak G Ghule
#Subject- To check desire ip address
echo "Plz enter Your desire IP address to ping test"
read ip
ping -c 4 $ip &>/dev/null
if [ $? -eq 0 ]; then
echo "Machine is up now"
else
echo "Machine is down"
fi