[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: screen -X command examples
From: |
Juergen Weigert |
Subject: |
Re: screen -X command examples |
Date: |
Wed, 13 Jun 2007 21:19:50 +0200 |
User-agent: |
Mutt/1.4.2.1i |
On Jun 13, 07 14:13:47 -0400, Andy Harrison wrote:
> On 6/13/07, Dan Burt wrote:
> >i only need to send one keystroke to the session - "s" to throttle, and "x"
> >to remove the throttle.
screen -S sessionname -X stuff s
and
screen -S sessionname -X stuff x
should do the trick.
If you also need to send a newline character, see below.
> I used to have trouble with something similar. I don't remember the
> nuts and bolts off the top of my head, but the man page should get you
> there. What I did was to rig up my .screenrc file so that it had a
> command to read a text file into one of the paste buffers, then when I
> wanted to use it, I just simply played that paste buffer and it did
> exactly what I wanted.
>
> I believe the specific issue was that I couldn't get screen to use the
> 'stuff' command with a carriage return, so that's why I went the paste
> buffer route.
Ouch. Screen does not apply its input parser when doing -X commands.
But bash can include a literal carriage return in a command like this:
screen -S sessionname -X stuff $'s\n'
cheers,
Jw.
--
o \ Juergen Weigert unix-software __/ _=======.=======_
<V> | address@hidden creator __/ _---|____________\/
\ | 0179/2069677 __/ (____/ /\
(/) | ____________________________/ _/ \_ vim:set sw=2 wm=8