mistake in for loop
===

terminal return me a "syntax error near unexpected token `do"

i can't locate a mistake

heeeelp me please...)

this is that terminal returns:

'234.sh: line 3: syntax error near unexpected token `do
'234.sh: line 3: `for folder in $array ; do





    #!/bin/bash
    base=$(pwd)
    array=`find * -type d`
     for folder in $array ; do
      cd $folder ;
      grep -n $1 * | while read line ;
       do    name=$(echo "$line" | cut -f1 -d:) ;
            if [ "$name" == "1234.sh" ]; then
            continue ;
            else
            string=$(echo "$line" | cut -f2 -d:) ;
            a=$(expr $string - 10)
            if [ $a -lt 1 ] ; then 
            a=1 ;
            fi ;
            b=$(expr $string + 10) ;   
            echo "-----------------------"
            echo $name:$a
            sed -n $a,${b}p $name;
            fi ;
        done
       cd $base ;
    done