![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| variable scope | shellwell | Shell Programming and Scripting | 3 | 07-15-2009 12:38 PM |
| variable inside variable inside loop headache | hcclnoodles | Shell Programming and Scripting | 6 | 06-18-2009 05:55 PM |
| scope of the variable - Naga | nagnatar | Shell Programming and Scripting | 13 | 04-27-2009 03:26 PM |
| Changing value of a variable inside a shell script | kshyju | Shell Programming and Scripting | 1 | 12-12-2008 05:06 AM |
| replacing a number with random variable inside shell script | user_prady | Shell Programming and Scripting | 3 | 09-11-2007 03:44 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
hi all, i'm using the following script, Code:
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: Code:
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 Last edited by pludi; 11-02-2009 at 03:45 AM.. Reason: code tags, please... |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|