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博客
bash bad interpreter: 没有那个文件或目录
解决方法:
vim filename
然后用命令
:set ff? #可以看到dos或unix的字样. 如果的确是dos格式的。
然后用
:set ff=unix#把它强制为unix格式的, 然后存盘退出。
再次运行脚本。
转自:csdn博客
相关文章推荐
- 一些shell代码片段
- 20160103有关 shell脚本
- 控制台、终端、shell
- python传递参数给shell
- shell script(一)
- Linux Shell 编程语法
- Linux Shell编程入门
- linux shell中的命令自动补全(compgen complete)与 命令行参数解析
- shell 命令行实现
- shell实现增加删除Linux系统用户脚本(密码为随机)
- -bash: ulimit: pipe size: cannot modify limit: Invalid argument
- 第一次使用 gitbash
- shell date cal
- shellcode
- /bin/bash^M: bad interpreter: 没有那个文件或目录
- spark-submit 和 spark-shell 后面可跟的参数
- .bash_profile和.bashrc以及profile的什么区别
- Bash shell programming 函数返回值
- shell命令
- linux shell 中文件编码查看及转换方法