从windows上传了一个脚本到Linux上执行 出现如下错误:$’\r’: command not found 这是windows与Unix文本编辑的默认格式不同造成的,需要转成unix格式。
![u=664045896,1541651988&fm=26&gp=0](https://lxlinux.superbed.verylink.top/item/6062a7cc8322e6675cce0e66.jpg)
解决方法
[root@localhost ~]# yum install -y Example.sh
[root@localhost ~]# dos2unix Example.sh
dos2unix: converting file Example.sh to Unix format ...
以上就是良许教程网为各位朋友分享的Linu系统相关内容。想要了解更多Linux相关知识记得关注公众号“良许Linux”,或扫描下方二维码进行关注,更多干货等着你 !
![img](https://lxlinux.superbed.verylink.top/item/61bda32b2ab3f51d910ba3f5.jpg)