Well yeah I have tried every possible method that I know of where KSH can send something to an external program but it seems nothing works. But I am still hoping that some scripting gurus here can weave some magic
. Anyway just to clear any possible misunderstanding of the issue, I will give a cleared example.
I have a program in java which prints several questions on the screen asking the user for an input. Please take note that the program is not a GUI driven. It is a text based menu and the user have to input he corresponding number of his choices. Please see below for the example.
*** SCREEN 01 ***
Please select the corresponding number of the operation you want to perform:
1. Install program
2. Uninstall program
0. Exit
*** User press 1 and goes to the second screen ***
*** SCREEN 02 ***
Please select the type of installation you wish to perform:
1. Full installation
2. Repair existing installation
0. Exit
*** User press 1 and goes to third screen and so on ***
What I want to happen is to have a program that will mimic the action of the user answering the questions (i.e. pressing 1 for the first screen and 1 again for the second screen). The input file will be something like the one below.
*** INPUT FILE ***
1
1
...
I hope some of the gurus can enlighten me if this is feasible or not. Also please take note that the java program was developed by a vendor and we don't have the source code for it.
Thanks and regards.