【问题标题】:How can I get currently attached screen session name?如何获取当前附加的屏幕会话名称?
【发布时间】:2013-05-31 02:37:20
【问题描述】:

我正在编写一个脚本,它需要当前附加的屏幕会话的名称(如果有的话)。

【问题讨论】:

标签: linux bash gnu-screen


【解决方案1】:

您可能想在这里查看答案:How do I display the current "session" name or "sockname" of a screen session in the status bar?

简而言之,$STY 环境变量就是您要寻找的。​​p>

【讨论】:

  • 可以通过${STY#*.}获取不带ID的会话名。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-12-03
相关资源
最近更新 更多