为什么 shell 脚本文件 execute.Linux 不能告诉我文件不存在

Why can't the shell script file execute.Linux told me the file of no existing

我输入了命令:./case-7.sh

我无法执行 shell 脚本 file.The Linux 告诉我 (-bash: ./case-7.sh: /bin/bash^M:错误的解释器:没有那个文件或目录)

我确保它存在于路径中并且具有可执行权限。

为什么 Centos 告诉我这个?请告诉我应该怎么做?谢谢!

您是否尝试过使用 chmod +x case-7.sh 授予您文件的权限?
你的电脑上有什么解释器?也许尝试使用 /bin/bash case-7.sh 启动可以解决问题?
如果没有,请添加您的.sh文件的代码,以便我们更准确地帮助您