bash scripts syntax error: unexpected end of file 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