运行完*.sh那个命令可以自动关闭终端
Tofloor
poster avatar
deepin-chinaren
deepin
2019-05-08 23:19
Author
运行完*.sh那个命令可以自动关闭终端?
Reply Favorite View the author
All Replies
avatar
wuyiheng119
deepin
2019-05-08 23:55
#1
消灭0回复
Reply View the author
avatar
aida
deepin
2019-05-09 19:14
#2
xx.sh  && exit
Reply View the author
Comments
demon07
2019-05-10 06:32
你这算两个命令。
avatar
deepin-chinaren
deepin
2019-05-10 03:30
#3

琮是不能自动关闭还是要手动回车才能关闭终端口。
Reply View the author
avatar
Lyvnee
deepin
2019-05-10 06:27
#4
有个配置文件,修改下就可以了
Reply View the author
avatar
deepin-chinaren
deepin
2019-05-10 06:44
#5
修改那个文件,怎么改呀
Reply View the author
avatar
aida
deepin
2019-05-10 17:03
#6
shell脚本最后一行加
exit 0
Reply View the author
avatar
OwenJia
deepin
2019-05-10 18:53
#7
直接 exec *.sh 就可以
Reply View the author
avatar
deepin-chinaren
deepin
2019-05-10 19:20
#8
#!/bin/sh
sudo apt-get autoclean;
sudo apt-get clean;
sudo apt-get autoremove;
sudo apt autoremove;
sudo apt-get update;
sudo apt-get upgrade;
sudo apt-get dist-upgrade;
exit 0
保存为xsjql.sh
双击时只能选在终端运行,运行完后在终端窗口不能自动关闭。
问怎么弄才能使运行完成自动关闭终端窗口?
Reply View the author
avatar
herdde
deepin
2019-05-11 06:35
#9
https://bbs.deepin.org/post/177805
#!/bin/sh
sudo apt-get autoclean;
sudo apt-get clean;

这么写脚本不会出问题吗?
Reply View the author
avatar
deepin-chinaren
deepin
2019-05-11 06:50
#10
https://bbs.deepin.org/post/177805
这么写脚本不会出问题吗?

不会呀,我天天都运行几次,就当清垃圾了,顺便升一下系统。
Reply View the author
avatar
herdde
deepin
2019-05-11 07:31
#11
https://bbs.deepin.org/post/177805
不会呀,我天天都运行几次,就当清垃圾了,顺便升一下系统。

Linux没什么垃圾
Reply View the author
avatar
deepin-chinaren
deepin
2019-05-11 15:59
#12
的确垃圾比较少。
Reply View the author
avatar
deepin-chinaren
deepin
2019-05-11 16:01
#13
把能用的东西装完16G,每天看都没有超过16G,运行速度还算可以,也没有出现过其他问题,把喜欢的游戏都开过来了。
Reply View the author
avatar
Lyvnee
deepin
2019-05-12 19:05
#14
找到终端配置文件~/.config/deepin/deepin-terminal/config.conf
将   print_notify_after_script_finish=true  中true修改为false即可。
Reply View the author