It would be nice to see that file so that we can see the context. Hope it isn't too long.
Note, if I understand what I am seeing above with your error message line 1 of you script looks like???
{rtf1ansiansicpg1252cocoartf1138cocoasubrtf230
If that is correct of course that's an error since that isn't a shell command line. Similarly line 2.
By any chance did you create that script as a .rtf file? That's what those lines look like. It should be a plain text file.
If you insist on using something like TextEdit then set it to "Make Plain Text" as opposed to "Make Rich Test" in TextEdit's Format menu.
I recommend you use a better test editor, for example BBEdit, TextWrangler, and a whole host of other text editers better suited for the purpose.