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.
_______________________________________________
screen-users mailing list
screen-users@gnu.org
http://lists.gnu.org/mailman/listinfo/screen-users