zoukankan      html  css  js  c++  java
  • Linux-006-执行Shell脚本报错 $' ':command not found

    在 windows 下编写 Shell 脚本,在 Linux 上执行时,报错提示: $' ':command not found。

    因为 windows 下的换行符是 ,而 Linux 的换行符是 。因而在 Linux 下运行 windows 编写的 Shell 脚本,会报如上所示的错误。

    解决方法:将换行符替换成 Linux 平台的换行符即可。命令如下所示:

    sed -i 's/ //' 脚本名

     

  • 相关阅读:
    #pragma
    STL~heap
    codeforces682A
    POJ1753(位操作和枚举)
    位运算
    getchar()(转)
    UVA2636
    UVA2639
    UVA2322
    UVa2521
  • 原文地址:https://www.cnblogs.com/fengpingfan/p/12651374.html
Copyright © 2011-2022 走看看