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

相關文章
相關標籤/搜索