build.sh 出现bash: $'\r': command not found

2025-05-09 19:21:43

1、问题表述:在Windows下编写好sh文件后,在Linux下运行会报错:bash: $’\r’: command not found

build.sh 出现bash: $'\r': command not found

3、解决方案一:通过vim编辑直接删除^M后保存就行,但是如果文档的内容比较长就悲剧了

build.sh 出现bash: $'\r': command not foundbuild.sh 出现bash: $'\r': command not found

5、总结:1. 问题陈述2. 发现问题原因3. 提供解决方案

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢