因为在window系统中写的shell脚本,然后上传到服务器执行,导致格式错误 1. 安装dos2unix #yum install dos2unix 2. 使用dos2unix对脚本转换。 #dos2unix xxx.sh