From: Boyd A. <boy...@us...> - 2004-03-02 06:50:52
|
Hi, I'm interested in getting screen and Expect to work together in a slightly less clunky way than I currently have. Currently I use something like: my $exp = Expect->spawn("screen -x -p $window_name"); which fires up a new instance of screen that shares the same session (in a multi-user way) with my interactive one. This works fine, but I wonder if there isn't a way to use screen's "exec" command to fire up my script. The "exec" command in screen allows a program to be run which is connected in a customisable way to the session in the window. In particular, I can connect STDOUT and STDIN of my spawned script to the input and output of my window respectively. This would be wonderful if I could get Expect to chat on STDIN/STDOUT, rather than a spawned process. So, is there a way to run a perl Expect script so that it chats on STDIN/STDOUT? (I guess this could be useful for debugging too) Boyd |