从windows上传了一个脚本Linux上执行 出现如下错误:$'\r': command not found
这是windows与Unix文本编辑的默认格式不同造成的,需要转成unix格式。

解决方法
[root@localhost ~]# yum install -y Example.sh
[root@localhost ~]# dos2unix Example.sh 
dos2unix: converting file Example.sh to Unix format ...

相关文章:

  • 2021-08-27
  • 2022-12-23
  • 2022-12-23
  • 2022-01-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-02
  • 2022-01-24
猜你喜欢
  • 2021-09-10
  • 2021-09-12
  • 2022-12-23
相关资源
相似解决方案