1. 问题描述 脚本deploy.sh启动报错:$‘\r’: command not found 2. 查看当前编码 1. 打开文件 vim deploy.sh 2. 查看编码 输入命令 :set ff 或 :set fileformat 可以看到 fileformat=dos 3. 修改编码 执行命令 :set ff=unix 或 :set fileformat=unix