我在文件中有一个脚本bla.sh
,它是可执行的。当我单击它时,将执行脚本并关闭窗口。我想窗户保持开着。
类似于cmd /k** command
Windows中的命令。
PS我不希望使用pause
的,但我希望能够在执行脚本之后写多个命令。
放在$SHELL
脚本的末尾:
一个小缺陷:由于gnome-terminal
未运行bash
外壳程序,因此将其视为应用程序,并在您尝试关闭终端时显示有关它的警告:
There is still a process running in this terminal
Closing the terminal will kill it.
我找不到隐藏此警告的好方法。如果需要,可以通过运行以下命令完全禁用它:
gconftool --set /apps/gnome-terminal/global/confirm_window_close --type boolean false
如果您使用的xterm
不是gnome-terminal,则不会发生这种情况;应该打扰你。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句