Error 1: [: too many arguments
if [ $i = "This is my script" ]
if your variable $i equals the string "This is my script", bash will not recognize it because the space can be recognized and bash will think there is more than one variables here.
[ This is my script = "This is my script" ]
Add double quotes to variable $i.
if [ "$i" = "This is my script" ]
Error 2: unexpected EOF while looking for matching ''' & syntax error: unexpected end of file
There is an extra apostrophe(') in a line in your code.
Check your code and delete the extra apostrophe(').