Hi all
Please take a look at the script below wich I've wrote :
1- cat /foo/bar.txt | while read $LINE12- do3-    cat /foo/bar/foo/bar.txt | 
while read $LINE24-    do 5-         if [ "$LINE1" = "$LINE2" ]; then6-         
      sw="1"7-               echo "Current value of sw is : " $sw8-             
  break9-         fi10-    done11-    echo "Value of sw is : " $sw12-    if [ 
"$sw" = "0" ]; then13-         DO SOMETHING14-    fi15-    sw="0"16- done       
   
You probebly guessed what I want to do. But the problem is that when the value 
of sw sets to 1 (in the first if statement) and the loop breaks , the value of 
sw is not '1' anymore in " echo "Value of sw is : " $sw " !!!
Thanks in advance ...
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to