可能原因:
脚本是windows下写的,然后传到linux下运行的
需要给dos文件格式转成unix
dos转unix
安装: yum install dos2unix
命令: dos2unix filename