[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sockname in hardstatus

From: Christian Mongeau
Subject: Re: sockname in hardstatus
Date: Sun, 21 Sep 2008 18:16:27 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

On 2008-09-18, Jaap Taal wrote:
> I'm looking on the net for a method to print the sockname/sessionname in  
> the hardstatus.> I was trying the following workaround:
> [...]
> screenrc:
> backtick 84 0 0 /home/jtaal/bin/screen_sockname
> hardstatus string "%84` ..."
> and the following bashscript in screen_sockname
> #!/bin/sh
> echo $STY

Changing your screen_sockname with:

screen -ls|sed '/(Attached)/!d;s/(Attached)//;s/    //'

works (it deletes every line that doesn't have an "(Attached)",
then sustitutes that string with an empty one and removes the tab
(notice that the last pattern is a tab, i.e. s/TAB//, though it's
not really necessary)). I hope there's a better solution, but you
can adapt the previous one.



SDF Public Access UNIX System -

reply via email to

[Prev in Thread] Current Thread [Next in Thread]