windows 下编辑shell,到linux报错,也是windows换行等造成

  sed -i 's/ $//' shell.sh

然后linux 下就不会报语法错误了。

原文地址:https://www.cnblogs.com/zlfucku/p/6110491.html