Hi all!
Currently I am working with Solaris 5.8 and would like to do the following from a ksh script:
open up a new terminal window (xterm for example), rlogin in that window to another host, and then run commands in that window.
I know that xterm has the "-e" switch that makes it possible to pass a command as a parameter, like:
xterm -e rlogin host_b -l user_b
This works fine from a script, but after the rlogin, I cannot run any other command from script(because it is already a new shell from unix point of view).
For example I cannot write this into my script:
xterm -e rlogin host_b -l user_b;echo hello world
(in this case echo world will be only executed after I disconnect from host_b...)
Is there a way to "send" a command to that newly opened xterm window so that it executes that command?
Any idea or help will be appreciated. Thanks.
Peter
Currently I am working with Solaris 5.8 and would like to do the following from a ksh script:
open up a new terminal window (xterm for example), rlogin in that window to another host, and then run commands in that window.
I know that xterm has the "-e" switch that makes it possible to pass a command as a parameter, like:
xterm -e rlogin host_b -l user_b
This works fine from a script, but after the rlogin, I cannot run any other command from script(because it is already a new shell from unix point of view).
For example I cannot write this into my script:
xterm -e rlogin host_b -l user_b;echo hello world
(in this case echo world will be only executed after I disconnect from host_b...)
Is there a way to "send" a command to that newly opened xterm window so that it executes that command?
Any idea or help will be appreciated. Thanks.
Peter