[Top][All Lists]

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

Re: How can I stuff in a new window of an existing screen session?

From: Michael Parson
Subject: Re: How can I stuff in a new window of an existing screen session?
Date: Thu, 5 Feb 2015 08:36:53 -0600 (CST)
User-agent: Alpine 2.11 (NEB 23 2013-08-11)

On Mon, 26 Jan 2015, George wrote:

Hi all,

I would really appreciate your help with this.

Suppose that I start a session like so:
$screen -dmS mysession

I would like a command that, at the same time:
1. Will create a new window named "newwindow" inside mysession
2. Will stuff "command" inside that new window

Any ideas how to do that?

Thank you in advance

PS. What I have tried and does not work:

$screen -S mysession -X stuff "command"
That will stuff "command" inside the *prexisting* window inside
mysession, but I would like a new window..

When you use "stuff" it helps to specify which window you want it to go
in.  I would recommend naming the window, then using that as the target:

This is technically two commands, but one command line:

screen -t "test" ; screen -X at "test" stuff "echo test^V^M"

The first one creates a new screen window called 'test'.  The second
one tells screen to stuff the string "echo test<return>" to the window
named "test".

You can put your session name stuff in there too.

Michael Parson
Austin, TX

reply via email to

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