更新时间:2022-02-26 22:49:30
我认为 file.sh 带有 CRLF 行终止符.
I think file.sh is with CRLF line terminators.
运行
dos2unix file.sh
那么问题就解决了.
您可以使用以下命令在 ubuntu 中安装 dos2unix:
You can install dos2unix in ubuntu with this:
sudo apt-get install dos2unix
.bash_profile语法错误:文件意外结束
Java简单代码:java.net.SocketException:来自服务器的文件意外结束
在bash脚本意外"语法错误:文件&QUOT意外结束;在if语句
.bashrc语法错误:文件意外结束
Shell 脚本语法错误:意外的文件结尾
Bash脚本:语法错误:文件意外结束
解析错误:语法错误,意外结束...
Bash:语法错误:重定向意外
AWK-语法错误:文件意外结束
语法错误:“("意外-在bash脚本中带有!(*.sh)