First impression, you are not exiting sqlplus.
Last line before "EOL" should be:
If this isn't the fix, please post the whole script (blanking any passwords etc.).
Please state what Operating System you have and what Shell you use.
Please post the complete error message (case-significant with all punctuation). There is no Shell or Oracle which will just give an error message "syntax error: unexpected end of file".