在window中编辑好的脚本,在Linux环境运行报错,提示‘\r’命令不可用
使用 vim 打开shell脚本,输入set fileformat=unix,保存即可解决。
set fileformat=unix