shell脚本文件在Windows下编辑后没法运行

方法一,使用notepad++  -> Save As,在弹出的保存对话框中选择保存类型为Unix script file。(未验证)html

方法二,vim

vim filenameunix

:set ff #查看文件的格式会看到fileformat=dos 或者 fileformat=unixorm

:set ff=unix #设置为unix格式htm

:wq #保存退出ip


参考:http://www.laozuo.org/549.htmlform

相关文章
相关标签/搜索