screen-users
[Top][All Lists]
Advanced

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

Re: Spawning commands inside interactive shells in new windows in a scri


From: László Monda
Subject: Re: Spawning commands inside interactive shells in new windows in a scriptable fashion
Date: Wed, 23 Jul 2008 23:36:29 +0200

Hi David,

(David has allowed me to reply to his email publicly.)

I think this is almost exactly what I need, but "^M" gets literally
quoted for me, just like as "\^M" or "\015".

How can I put new line characters in there?

Thanks!

On Tue, 2008-07-22 at 09:10 +0100, address@hidden wrote:
> I don't know if this will help you but I have a small script that will
> start up folding at home in a running screen session. Here is the
> basis of it
> 
> $ cat screen.scpt
> screen -S desktop4 -X screen -t t1
> screen -S desktop4 -p t1 -X stuff 'cd /^M'
> screen -S desktop4 -p t1 -X stuff 'ls ^M'
> screen -S desktop4 -X screen -t t2
> screen -S desktop4 -p t2 -X stuff 'cd programming^M'
> screen -S desktop4 -p t2 -X stuff 'file *^M'
> 
> It will open a new screen called 't1', select it, cd to / and ls it,
> then another called 't2' move into my programming folder and do a
> 'file' on the content.
> 
> It seems like this might be the basis for what you need?
> 
> On 22/07/2008, László Monda <address@hidden> wrote:
> > On Thu, 2008-07-17 at 12:40 -0400, Mark Eichin wrote:
> >> looks like you might want to use "stuff" to push the commands at a
> >> normal screen that has a shell open (so that it runs them, and stays
> >> interactive.)
> >
> > I don't think that "stuff" is capable of what I want to do.  I basically
> > want to write a script, like:
> >
> > new-screen-window ls
> > new-screen-window du /
> > new-screen-window my-script
> >
> > Where the new-screen-window utility opens new screen windows without
> > jumping to them.  I'd also like to specify the title of the individual
> > windows.
> >
> > --
> > Laci  <http://monda.hu>
> >
> >
-- 
Laci  <http://monda.hu>

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

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