您的位置:首页 > 运维架构 > Shell

bash bad interpreter: 没有那个文件或目录

2016-01-04 15:45 357 查看
shell 脚本怀疑是Windows文件格式的,Linux上执行报错:

bash bad interpreter: 没有那个文件或目录

解决方法:

vim filename

然后用命令

:set ff? #可以看到dos或unix的字样. 如果的确是dos格式的。

然后用

:set ff=unix#把它强制为unix格式的, 然后存盘退出。

再次运行脚本。

转自:csdn博客
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: