如何获得当前附加的屏幕会话名称? [英] How can I get currently attached screen session name?

查看:77
本文介绍了如何获得当前附加的屏幕会话名称?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个脚本,如果有的话,它需要当前连接的屏幕会话名称的名称.

I'm writing a script which needs the name of the currently attached screen session's name if there's any.

推荐答案

您可能希望在此处查看答案:

You might want to check answers here: How do I display the current "session" name or "sockname" of a screen session in the status bar?

简而言之,您正在寻找$ STY环境变量.

In short the $STY environment variable is what you are looking for.

这篇关于如何获得当前附加的屏幕会话名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆