'); /*! This file is auto-generated */ !function(e,a,t){var n,r,o,i=a.createElement("canvas"),p=i.getContext&&i.getContext("2d");function s(e,t){var a=String.fromCharCode,e=(p.clearRect(0,0,i.width,i.height),p.fillText(a.apply(this,e),0,0),i.toDataURL());return p.clearRect(0,0,i.width,i.height),p.fillText(a.apply(this,t),0,0),e===i.toDataURL()}function c(e){var t=a.createElement("script");t.src=e,t.defer=t.type="text/javascript",a.getElementsByTagName("head")[0].appendChild(t)}for(o=Array("flag","emoji"),t.supports={everything:!0,everythingExceptFlag:!0},r=0;r
您的位置 首页 教育

【Linux中shell脚本】Linux中shell脚本回车换行问题

背景:         windows下编辑shell脚本,报错               syntax e…

背景:

        windows下编辑shell脚本,报错

              syntax error near unexpected token ‘$’ r”

问题产生原因:

        因为windos与linux换行符不同导致。

     notepad++中,“视图->显示符号->显示所有符号”,然后可以看到所有的 回车 换行 对应windows的CR LF:        

解决方案:

        notepad++:“编辑->档案格式转换->转换为UNIX格式” (保存即可)

 

本文来自网络,不代表0514资讯网立场,转载请注明出处:https://www.0514zx.com/info/6405.html
0514zx.com

作者: 0514zx.com

优质职场领域创作者
联系我们

联系我们

工作时间:周一至周五,9:00-17:30,节假日休息

关注微信
微信扫一扫关注我们

微信扫一扫关注我们

CMS教程网 趣丁号猫咪日记趣文库每日星座运势电脑技术初夏网站长分类目录丝路百科趣学百科趣科技号热门榜论文之家问百科网