Linux 使用gnome终端获取新选项卡

Linux 使用gnome终端获取新选项卡,linux,terminal,gnome,Linux,Terminal,Gnome,我不熟悉脚本编写 我在我的项目中使用了下面的代码,但是终端马上就要关闭了。我要保持终端并继续运行 #!/bin/bash/ gnome-terminal --tab --working-directory="/home/sandhya/OpenBTS/public/openbts/trunk/apps/" -e "file = grep OpenBTS /home/sandhya/OpenBTS/public/openbts/trunk/apps \ if [ -f $file ] \ the

我不熟悉脚本编写

我在我的项目中使用了下面的代码,但是终端马上就要关闭了。我要保持终端并继续运行

#!/bin/bash/

gnome-terminal --tab --working-directory="/home/sandhya/OpenBTS/public/openbts/trunk/apps/" -e "file = grep OpenBTS /home/sandhya/OpenBTS/public/openbts/trunk/apps \
if [ -f $file ] \
then \
         echo " file exits" \
     sudo "/home/sandhya/OpenBTS/public/openbts/trunk/apps/OpenBTS" \

fi" 
我希望终端保持稳定并继续运行应用程序

如果我使用的方法或语法错误,请更正。

在gnome终端中

-转到编辑->配置文件

-双击默认配置文件

-单击标题和命令选项卡

-选择“保持终端”将从位于窗口底部的“命令退出时”列表中打开

-关上窗户

现在运行脚本,它会工作的

或者,您也可以按如下方式添加配置文件并运行脚本

单击“新建”选项卡。并提供您的个人资料名称

从标有“当命令退出时”的下拉菜单中选择“保持终端”。您应该为此创建一个新的配置文件,并使用

gnome-terminal --window-with-profile=NAMEOFTHEPROFILE -e command
要使终端在命令退出时保持不变,请执行以下操作:

在康索尔有一面国旗

在xterm中,有一个-hold标志