如何创建 shell 脚本来启动 3 个终端并在每个终端中执行一组命令?

How to create a shell script to launch 3 terminals and execute a set of commands in each?

目前,我打开 3 个终端('openocd session'、'telnet session' 和 'gdb session')并在每次在目标上闪烁图像时在每个终端中执行 'a set of commands'。

是否可以将其同时放入一个 shell 脚本文件和 运行 中? (每个终端上的命令不依赖于其他;除了终端应按上述顺序打开)

提前致谢!

您使用的是哪个终端?

xterm 这样的终端可以代替 shell 启动程序。简直运行

xterm -e 'command args ...'

我用它来启动我的电子邮件客户端:

xterm -e mutt

如果您使用不同的终端,请查阅其手册页。我很确定 -e.

有一个等价物