正如问题所述,我在使用交互式环境中的几个命令时遇到了问题。例如,我在编译内核,我键入以下命令:如何在交互式环境中使用bash命令?
bash << fin
make nconfig # this is an interactive command
xdotool key F9 # this simulate a keystroke
xdotool key Return # this simulate a keystroke
xdotool key Return # this simulate a keystroke
fin
它的工作原理,但我为什么我总是得到这样的stderror躁动:
bash: line 3: 0: command not found
(其中,3号线= bash << fin
)
是发表的代码足以重现该问题? –
对不起,完整的代码是:#!/ bin/bash echo“这里有一些注释”bash << fin make nconfig#这是一个交互命令 xdotool key F9#模拟键盘 xdotool key返回#这模拟了一个按键 xdotool key返回#这个模拟一个按键 fin回声“其他人在这里评论” – shaveax
该代码是不够重现的问题。错误消息说'bash'找不到命名为'0'的命令。在你的真实代码中__,你有没有错位的零点? – John1024