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 foundpart was moved to the beginning of the line. And also-versiondoes not work, which would not if it would be-version$'\r'