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
相关文章
相关标签/搜索