shell脚本运行出错:No such file or directory

使用xshell编辑了shell脚本,在服务器端运行出错:
: No such file or directory

后来发现是windows和Linux操作系统下编辑器的换行符不同导致,改一下就可以,一般用vi打开文件,然后
: set ff=unix
再保存退出

发布了135 篇原创文章 · 获赞 7 · 访问量 3万+

猜你喜欢

转载自blog.csdn.net/math_computer/article/details/103955986