Here is the script ... Enjoy #!/bin/bash
IFCONFIG="/sbin/ifconfig $1" ISIT=`$IFCONFIG | grep "UP" | wc -l`; if test $ISIT -gt 0; then echo "Yup ... $1 is up!"; else echo "Nope ... No $1 or it'sn't up!"; fi TODO : Add a checker. You need one argument which is the device you're looking for. Suppress the error message if no device is present in the system. On Thu, 9 May 2002, Rory Campbell-Lange wrote: > I'm trying to clarify my own question: > > What is the easiest way in bash to find if eth0 is up? > > Thanks > Rory > > -- Jean-Francois Gobin - Administrateur gobinjf.be http://www.gobinjf.be mailto:[EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]