Shell常见错误:syntax error: unexpected end of file

记录一个错误:
用nodepad++写一个简单的shell脚本,在编译服务器上运行始终报错:
syntax error: unexpected end of file
sh 并没有13行。
在这里插入图片描述
解决方式:
将文档转换成Unix格式,或者直接用vim编辑器编写。
在这里插入图片描述

发布了39 篇原创文章 · 获赞 13 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/qq_43443900/article/details/103349729