Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 bash 脚本,它启动两个本地区块链节点,而不是将输出保存到日志文件中,我想打开一个终端以在终端上连续打印它:
我试过了
konsole --noclose -e blockchain start
但随后 bash 脚本不会继续执行脚本中的下一个命令。
任何想法如何在打开 2 个具有持续输出的终端时保持脚本运行?
&您可以通过在命令末尾添加一个来实现这一点:
&
konsole --noclose -e blockchain start &
这向 shell 表明它应该在子 shell 的后台执行命令。效果是 shell 不等待命令完成,而是立即继续。