脚本完成后退出屏幕
当我在屏幕中启动的脚本完成后,我可以告诉它关闭它所在的当前屏幕吗? 如果是这样怎么办? 我知道我可以先按“ctrl + a”,然后按 k,然后按 y。想要杀死它,但我不在那里发布那些按钮。 我尝试在脚本末尾添加“退出”,这似乎并没有将其关闭。
我还有一个脚本,可以在屏幕中自动启动另一个脚本,这似乎可行,但我不能 100% 确定我的所有语法都正确吗?
screen -dm -S "script0$scriptID"; sleep 1; screen -S "fscript0$scriptID" -X screen ./script.sh "$input1" "$input2"
谢谢任何帮助。
When a script that I started in a screen is finished can I tell it to close the current Screen it's in?
If so how?
I know I can do "ctrl + a" then k, then y. To kill it but Im not there to issue those buttons.
And I tried adding "exit" to the end of the script which doesn't seem to close it ether.
I also have a script that will auto start another script in a screen, this seems to work, but Im not 100% sure that I got all the syntax right?
screen -dm -S "script0$scriptID"; sleep 1; screen -S "fscript0$scriptID" -X screen ./script.sh "$input1" "$input2"
Thanks any help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
此命令将导致
screen
的当前会话退出:第二个问题中的命令语法对我来说看起来没问题。您能否更具体地说明您认为可能存在问题的地方?
This command will cause the current session of
screen
to quit:The syntax of the command in your second question looks OK to me. Can you be more specific about where you think there might be a problem?
有时,可以通过向其发送中止键序列来杀死保持打开屏幕的顽固脚本:
Sometimes a stubborn script holding open a screen can be killed by sending it an abort key sequence: