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 | a...@deuxchevaux.org (Mail) X See http://www.nonhtmlmail.org/campaign.html | a...@noone.org (Mail+Jabber) / \ I love long mails: http://email.is-not-s.ms/ | http://abe.noone.org/ (Web) _______________________________________________ screen-users mailing list screen-users@gnu.org https://lists.gnu.org/mailman/listinfo/screen-users