为了账号安全,请及时绑定邮箱和手机立即绑定

-bash: ./new_t.sh: bin/bash/: bad interpreter: 没有那个文件或目录

用bash命令可以执行,但是赋予权限后直接调用就显示

-bash: ./new_t.sh: bin/bash/: bad interpreter: 没有那个文件或目录

执行代码如下:

[root@localhost text01]# bash hello.sh 

 ddd成功 

[root@localhost text01]# ./hello.sh 

-bash: ./hello.sh: bin/bash/: bad interpreter: 没有那个文件或目录


正在回答

3 回答

注意#!/bin/bash 不是大写的B bin下没有Bash 那个目录

在脚本中改成bash 就行了 要不就创建一个Bash 软连接到bash


0 回复 有任何疑惑可以回复我~

找错目录了吧

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

-bash: ./new_t.sh: bin/bash/: bad interpreter: 没有那个文件或目录

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信