运行bash *.sh命令时出现错误
$'\r': command not found
使用vim命令
vim *.sh
输入
:set ff
查看文件编码格式,其中dos用于windows,unix用于linux。
fileformat=dos
修改编码格式
:set ff=unix
:wq
运行bash *.sh命令时出现错误
$'\r': command not found
使用vim命令
vim *.sh
输入
:set ff
查看文件编码格式,其中dos用于windows,unix用于linux。
fileformat=dos
修改编码格式
:set ff=unix
:wq