Syntax error

I keep recieveing this error message:

 del: line 13: syntax error: unexpected end of file

This is my script:

1 echo -e "Enter a filename"
  2 read filename
  3 if [$filename = myfirst]
  4 then
  5   echo -e "do you want to delete?"
  6 read answer
  7 if [answer= Y]
  8 then rm myfirst
  9 else [answer = N]
 10 echo -e "file not deleted"
 11 fi
 12 exit0

Is this a homework assignment? (Homework and coursework questions can only be posted in this forum under special homework rules.)

Does your script actually contain the line numbers you have shown us? (If it does, it won't work.)

What operating system are you using?

What shell are you using? (No matter which shell you're using, you have numerous syntax errors. But you are probably getting the error message you mentioned because you have two if statements and only one of them is terminated.)