没有语法错误,报Syntax error: "elif" unexpected (expecting "then")可能是格式的问题,使用以下代码解决。 sed -i 's/\r//' yourfilename