方法1 对应文本内执行以下命令 ~ :set ff=unix 方法2 使用dos2unix命令 dos2unix test.sh 转载于:https://my.oschina.net/wuxueshi/blog/1817547