Shell腳本「syntax error: unexpected end of file」緣由,不必定是格式問題

Shell腳本「syntax error: unexpected end of file」緣由,不必定是格式問題 直接說結論 兩種狀況: 1 格式問題,使用命令 dos2unix api_tool.sh (api_tool.sh爲本身的腳本名) 2 語法問題 使用 shell -n api_tool.sh 分析緣由 根據報錯檢查 if else fi 或者 while done 或者 for do
相關文章
相關標籤/搜索