拷贝脚本提交后报错 line 2: $'r': command not found,但是这是别的同学可以运行后发给我的,随后开始排查。
二.问题解决任务执行错误是因为原始脚本是在 windows 环境下编写而本机 linux 不识别导致,因此需要将对应文件转化为 linux 版,执行下述命令转换文件 format:
dos2unix file
随后提示:
dos2unix: converting file file to Unix format ...
同理,如果你的文件是在 linux 编写需要到 windows 环境使用:
unix2dos file三.工具安装 1.安装 dos2unix
安装 dos2unix 需要使用 yum
yum install dos2unix2.安装 yum
安装 yum 需要使用 brew
brew install yum



