screen-users
[Top][All Lists]
Advanced

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

Re: need "windowlist" info externally, not interactively


From: Axel Beckert
Subject: Re: need "windowlist" info externally, not interactively
Date: Fri, 23 Oct 2015 09:22:10 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Hi,

On Thu, Oct 22, 2015 at 04:48:50PM -0400, Anonymous wrote:
> screen -p "${uid%% *}" -X exec script -c env /tmp/window_env.txt
[...]
> One tricky part was coming up with "script -c env
> /tmp/window_env.txt", because redirection does not work (initially I
> tried simply "env > /tmp/window_env.txt").

screen -p "${uid%% *}" -X exec sh -c 'env > /tmp/window_env.txt'

might work, too. screen probably directly calls execv(3) and friends
which doesn't do shell syntax expansion but just passing everything
behind the command as parameters. If you make the command a shell and
pass it shell code as parameter, it gets parsed with shell syntax
again.

> > Have you tried "screen -Q windows"?
> 
> Thanks for that.  I didn't know about the -Q option.  It turns out
> that the version of screen available is too old for that, so hacks
> still needed.

Yeah, it's not so old.

> I was pleased to find that my home machine has -Q though.

:-)

                Kind regards, Axel
-- 
/~\  Plain Text Ribbon Campaign                   | Axel Beckert
\ /  Say No to HTML in E-Mail and News            | address@hidden  (Mail)
 X   See http://www.nonhtmlmail.org/campaign.html | address@hidden (Mail+Jabber)
/ \  I love long mails: http://email.is-not-s.ms/ | http://abe.noone.org/ (Web)



reply via email to

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