参考:https://blog.csdn.net/u012453843/article/details/69803244
查看脚本格式
:set ff
如果显示
fileformat=unix
就执行
set ff=unix
再查询:
fileformat=unix
保存并给执行权限就ok了
解决执行脚本报syntax error: unexpected end of file或syntax error near unexpected token `fi'错误的问题
原文:https://www.cnblogs.com/collin/p/12022719.html