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: #!/bin/sh 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. Regards. chr -- SDF Public Access UNIX System - http://sdf.lonestar.org _______________________________________________ screen-users mailing list screen-users@gnu.org http://lists.gnu.org/mailman/listinfo/screen-users