[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ping



ping does not natively make those 'deductions', be it is easy to write a 
wrapper that does that for you. Something like:
case `ping -qc 5 $1` in
 *'100% packet loss'*) 
   echo "Target host $1 does not respond to ICMP echo requests."
 ;;
 *) 
   echo "Target host $1 responds to ICMP echo requests."
 ;;
esac


On Tue, May 29, 2001 at 11:48:14PM -0700!@?#?%?, Noam Meltzer wrote:
> Hi!
> I know that on Solaris the output of "ping" is "<host> is alive" or 
> "service not avaiable" (or something like that)
> i was wandering how i can achieve such answer in linux.
> 
> noam
> 
> 
> =================================================================
> To unsubscribe, send mail to linux-il-request@linux.org.il with
> the word "unsubscribe" in the message body, e.g., run the command
> echo unsubscribe | mail linux-il-request@linux.org.il
> 

=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il