Tabs 如何创建多个终端选项卡并使用shell脚本命名每个选项卡

Tabs 如何创建多个终端选项卡并使用shell脚本命名每个选项卡,tabs,gnome-terminal,Tabs,Gnome Terminal,在bashrc文件中,我粘贴了一个函数集标题,在运行该脚本后,创建了3个选项卡,但bash命令不执行 #!/bin/bash tab="--tab" cmd="bash -c 'set-title hey';bash" foo="" for i in 1 2 3; do foo+=($tab -e "$cmd") done gnome-terminal "${foo[@]}" exit 0

在bashrc文件中,我粘贴了一个函数集标题,在运行该脚本后,创建了3个选项卡,但bash命令不执行

#!/bin/bash

tab="--tab"
cmd="bash -c 'set-title hey';bash"
foo=""

for i in 1 2 3; do
      foo+=($tab -e "$cmd")         
done

gnome-terminal "${foo[@]}"

exit 0