-bash: /etc/init.d/nginx: /bin/bash^M:bad interpreter: No such file or directory

-bash: /etc/init.d/nginx: /bin/bash^M: bad interpreter: No such file or directory

这个使为了弄nginx自启的,然后在官网找了个shell脚本发现不行啊。。。。。。

找啊找。。。。

解决

vi /etc/init.d/nginx

-bash: /etc/init.d/nginx: /bin/bash^M: bad interpreter: No such file or directory

-bash: /etc/init.d/nginx: /bin/bash^M: bad interpreter: No such file or directory


-bash: /etc/init.d/nginx: /bin/bash^M: bad interpreter: No such file or directory


保持退出就行。。。

因为使复制的别人的脚本。。。。。。

所以在Linux中运行所以使dos格式的


ok,然后解决了