hi all,
i'm using the following script,
Status=1
Function_do ()
{
while read line;
do
if [ ` echo $line | grep 'symbol not found:' | wc -l` -eq 1 ]; then
#echo $line
if [ ! `echo $line | grep 'kxdfhei1' | wc -l ` -eq 1 -o ! `echo $line | grep 'main' | wc -l ` -eq 1 ]; then
Status=0
echo " LINKINK ERROR "
fi
fi
done < ldd.log
}
Function_do
echo " Status = $Status "
OUTPUT:
LINKINK ERROR
Status = 1
What happen to the value of Status=0 that i set inside If condition? What happens if use while? the same script if i use for loop it is giving proper output.. status=0. I'm not able to understand the logic behind it. Can any one help me in this?
Regards,
Vijay