fileformat set

在windows下新建的sh文件,copy到linux下有的会报错,一般是格式问题。

使用vim进行一下文件格式fileformat转换

可使用fileformat或简写ff

set ff 或 set ff?     #显示当前文件格式


set fileformat=unix 或 set ff=unix     #设置成unix格式

set ff=dos #设置成dos格式

原文地址:https://www.cnblogs.com/zhanglin123/p/13859001.html