In this example the program spawns three bash shells. The output from the first bash shell is displayed to the user.
------------EXAMPLE BEGIN----------------- Script started on Sun Dec 21 22:11:51 2003 /home/aravind/coding/c/projects/commplex $cat wins bash bash bash /home/aravind/coding/c/projects/commplex $ /home/aravind/coding/c/projects/commplex $ps PID TTY TIME CMD 17996 pts/10 00:00:00 ksh 17998 pts/10 00:00:00 ps /home/aravind/coding/c/projects/commplex $ /home/aravind/coding/c/projects/commplex $./commplex wins Please select the number of the command (between 1 and 3), whose output you want displayed on screen:1 File has 3 commands. Spawned bash Spawned bash Spawned bash High FD: 5 ~/coding/c/projects/commplex $pstree 17996 ksh---commplex-+-bash---pstree `-bash `-bash ~/coding/c/projects/commplex $exit exit /home/aravind/coding/c/projects/commplex $ Script done on Sun Dec 21 22:12:41 2003 ------------EXAMPLE END-------------------
Anything you type in the main window will be sent to all the processes (the three bash shells in this case) listed in the command file (wins in this case). The output from one of the processes (shell 1 in this case) will be displayed on screen.
Ideally we would not need programs like this, the "multipurpose swiss army" GNU screen program would eventually add this functionality to their program and this wouldn't be necessary anymore. I do intend to add GUI support to this, so the user would be able to see a separate window for each command, focus and target specific windows, etc. I plan on using GNOME's VTE for this, I just haven't gotten around to it. Please check the todo list for future plans.