|
From: | Rod Nussbaumer |
Subject: | Re: script to run screen with multiple telnet windows? |
Date: | Sat, 17 Jun 2006 00:39:58 -0000 |
User-agent: | Mozilla Thunderbird 1.0.8-1.4.1 (X11/20060421) |
Sam Cramer wrote:
I'm trying to write a script to start a screen session with multiple telnet windows to a terminal server. The name of the terminal server varies, as does the number of windows, so this isn't something I can do by just adding some lines to my .screenrc. I tried creating a screen session and then repeatedly sending it commands using -X as follows screen -S screen_cons -X screen -t node$i $i telnet $tsv 20$i
Try something more like this. screen -S screen_cons -t node$i $i screen -S screen_cons -X stuff "telnet $tsv 20$i`echo -ne '\015'`"It is hard to tell exactly what you are trying to do here, but telnet isn't a command known to screen. It seems more like you want the telnet command to be passed on to the shell running IN screen. The stuff command does that. You have to get that pesky newline in there to end the line, too. You might have to remove the double quotes.
--- rod.
[Prev in Thread] | Current Thread | [Next in Thread] |