Re: need "windowlist" info externally, not interactively

Axel Beckert <[email protected]>
Newsgroups gmane.comp.gnu.screen.user
Organization DeuxChevaux.org -- The Citr oën 2CV Database
Message-ID <[email protected]>
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            | [email protected]  (Mail)
 X   See http://www.nonhtmlmail.org/campaign.html | [email protected] (Mail+Jabber)
/ \  I love long mails: http://email.is-not-s.ms/ | http://abe.noone.org/ (Web)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.