Syntax error with a script

Hi

I not sure what is wrong with my script... when I try to run it I get the follow error: "remove: syntax error at line 77: `end of file' unexpected" Thanks in advance for any help.

ans=y
while [ "$ans" = "y" ]
do
          while :
          do

                echo "Please enter a name that you want to remove /c"
                read name

                if [ $name" = "" ]
                then
                     echo "You have not enter a name"
                     echo "Please try again."
                     continue

                else
                     echo "Searching for $name in the phonebook"
                     break

                fi
        done

        clear

        grep -in "$name" phonebook | sed -n -e 's/^/\
                                /' -e 's/:/\
                                /gp'
        while :
        do
                echo "Please enter the record that you want to remove:"
                read number

                total=`cat phonebook|wc -1`

                if [ "$number" != "" ]
                then if [ $number -ge 1 -a $number -le $total ]

                        then
                                echo "Removing record"
                                break

                        else

                                echo "You did select a vaild record"
                                echo "Please try again"
                                continue

                        fi

                else

                        echo "You didn't enter a record number"
                        continue
                fi
        done

        sed "$number"d phonebook > phonebook.tmp
        mv phonebook.tmp phonebook

        echo "Do you want to remove another record? (y/n) \c"
        read ans
done

I think it may have to do with my indentation however the script will not paste properly on the board.

Hi Bart, please use code tags when posting and indent your code. That will make it so much more readable.
There seems to be a missing double quote on line 10.

if [ "$name" = "" ]

Thank you so much...that was it. I am new to the board how do use code tags?

Select the text you want inside code tags and click on # or use the following syntax.

 

[/noparse][/code]