In a console based text editor( I use vim) you can press on following three 
keys;
ctrl v enter

This will embed a literal newline into the file, tested with the given script. I'm not sure about embedding newlines with GUI editors.

By the way, David's suggestion was very helpful, I realized I did not know about -p

:)


László Monda demis ki::
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, [EMAIL PROTECTED] 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 <[EMAIL PROTECTED]> 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>



------------------------------------------------------------------------

_______________________________________________
screen-users mailing list
screen-users@gnu.org
http://lists.gnu.org/mailman/listinfo/screen-users


_______________________________________________
screen-users mailing list
screen-users@gnu.org
http://lists.gnu.org/mailman/listinfo/screen-users

Reply via email to