Hi,
I want to write a interpreter using ksh, the sample
file needs to be interpreted is something like:
===================================================
TERM Label1 user1 mach1
TERM Label2 user2 mach2
Label1
uname -a
pwd
... // other Unix commands
Label2
...
Label1
...
===================================================
Whenever a line with "TERM" at the beginning is read
from the input, the interpreter should be able to emulate
that someone has logged in some machine and started
a session terminal... Take the line "TERM Label1 user1
mach1" for example, the interpreter will "open" a terminal
for user1 at mach1, and labeling this terminal as "Label1",
waiting for commands input ...
Then, all commands below "Label1" are executed in this
terminal ...
I think Unix shell can meet this need. But I have no
idea. Anyone has a good idea about the implementation
in ksh?