Thanx
But can´t I use the cat command and send the output to $A1.
I´m using Linux Redhat 6.2
Will try to use the return values from ping.
going to check out election, ,maybe i can use that software and only change a little
in the source code. :)
MIME:[EMAIL PROTECTED]
2001-04-05 14:54
To: rikard lindberg@selek
cc:
Subject: Re: need help an a script
didn't check it completely but things like
cat ping1 | grep icmp_seq=0 &> $A1
echo down &> $ETH0
will generate errors, as $A1 and $A2 are not defined and get replaced by an empty
string.
you should do things like:
A1=`grep icmp_seq=0 ping1`
you can even do things like:
if [ `ping putyourflagsandarg` ]; then
firsthost="down";
fi
but you need to check the return values of ping and other programs.
(to do that, just try ping with existing and non existing hosts using a shell
script...)
you might check
http://www.javadelic.com/~ali/election/
but this is written in perl....
BTW. you didn't say what OS you're using. I guess it's Linux (from the last sentences,
but it's not clear though)?
good luck
*****************************************************
Rikard Lindberg
Selek AB
Tel: +4622662500
Fax: +4622612895
Internet Address: [EMAIL PROTECTED]
Home Page: http://www.selek.se
*****************************************************
-
[To unsubscribe, send mail to [EMAIL PROTECTED] with
"unsubscribe firewalls" in the body of the message.]