虚位以待(AD)
虚位以待(AD)
首页 > 操作系统 > LINUX > centos下执行脚本 ,报错: /bin/bash^M: bad interpreter: No such file or

centos下执行脚本 ,报错: /bin/bash^M: bad interpreter: No such file or
类别:LINUX   作者:码皇   来源:<a href="http://blog.csdn.net/yu1013708633" target="_blank" rel="nofollo   点击:

centos下执行脚本,报错: bin bash^M: bad interpreter: No such file or directory

1、用 vi 文件名进入编辑文件格式,:set ff

提示文件为dos格式

2、强制装换格式为unix

set ff=unix

3、再次执行恢复正常。

原因为脚本文件格式为dos格式,需要转换为unix格式

相关热词搜索: