I saw a similar problem in bash but couldn't solve it for my case. I'm running a simple script:
#!/bin/bash
set mystring=0
if ( "$mystring" == "0" )
echo "true"
elseif
echo "wrong"
endif
my output is "line 12: syntax error: unexpected end of file". Can you help?