You haven't shown us your entire script. Of the six lines you did show, one was Bourne shell, and you seem to have wrongly deduced that the error is somewhere it is not.
I haven't used C-Shell in the best part of 20 years - and for good reason -
it's rubbish,
really rubbish! Just because "other scripts" in the directory uses it doesn't mean you have to!
Please post your entire script so we can see the big picture instead of doing this piecemeal.