****.sh: line 10: syntax error: unexpected end of file

****.sh: line 10: syntax error: unexpected end of file

sh腳本執行出錯

檢查好多遍沒問題:::::::::

操作步驟:

1.vim *.sh
在這裏插入圖片描述
2. :set ff
在這裏插入圖片描述
3.回車:查看文件格式,如果是dos格式,執行第四步

在這裏插入圖片描述
4.講腳本設置爲 unix格式 set ff=unix
在這裏插入圖片描述
5.回車, :wq 保存,然後沖洗執行. done

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章