1、执行脚本 ./1.sh时报如下错误

-bash: ./1.sh: /bin/bash^M: bad interpreter: No such file or directory


2、在Windows编辑的脚本导入Linux系统中,执行报错问题

yum  install -y  dos2unix 

3、或者本地安装    

rpm  -ivh  /mnt/Packages/dos......

4、然后执行再执行 

dos2unix  执行报错的脚本

-bash: ./1.sh: /bin/bash^M: bad interpreter: No such file or directory解决方法-LMLPHP

03-22 08:04