I have to execute a unix interactive command that launches another ksh interactive shell, so I can then execute other commands.
expect or tcl/tk is not available, and it seems that I cannot play with redirects (as first interactive command launches other child that I cannot redirect (or don't know how to) outputs.
Example (not automatted)
$ /bin/someComand username: xpto password: xpty someCommand is now executing other voodooshell: voodooshell$ /bin/anotherCommand This is the output you want.. bye .
The 1st part is simple:
$ /bin/someCommand<<E xpto xpto E
Trying something like this does not work
$ /bin/someCommand<<E xpto xpto E<(otherPrettyCommands<<A who quit A )
So i though..... c program with popen !? :-) well, that's fine to solve the 1st problem again, but how can I get the child process of the 1st problem and redirect commands to it before it quits ? :-(
How would you solve this ?