出错./startBatch.sh line 2 😒’\r’: command not found 原因是 windows 下的换行符是 \r\n,而 linux 下的换行符是 \n 解决方案:首先 安装 dos2unix yum install dos2unix -y chmod +x startBatch.sh ./startBatch.sh & (意思是关闭页面,后台运行,startBatch.sh就是脚本文件名)