我正在尝试通过sh
运行程序 midnight commander ,并且可以使用sh
来运行它,但是当我尝试不使用script.sh
来运行它时,我得到:
script.sh:找不到命令
这是#!bin/bash
mc
:
od -c script.sh
我找到了有关此主题的一些答案("command not found" when running shell script)。在此答案中,他们建议运行命令0000000 # ! / b i n / b a s h \n m c \n
0000017
以显示不可见的字符。
这是该命令的结果。
{{1}}
我认为该命令没有显示隐藏的字符。
有人可以告诉我这里是什么问题吗?
答案 0 :(得分:3)
首先向script.sh
授予执行权限
chmod +x script.sh
然后./script.sh