The bash file has dos line endings. To fix the issue, follow the this answer.
How do we know? @KamilCuk commented a good explanation.
The line
: not found test.sh:
starts with a:
. It looks like:shell: test.sh: \r: not found
, but the: not found
part was moved to the beginning of the line. And also-version
does not work, which would not if it would be-version$'\r'