bin/sh 1 syntax error: end of file unexpected code example
Example: syntax error: unexpected end of file bash
I think file.sh is with CRLF line terminators.
run
dos2unix file.sh
I think file.sh is with CRLF line terminators.
run
dos2unix file.sh