Shell script call command line application
I have a Java program which I'd like to call inside a linux shell script.
The Java program takes a user input from the command line.
I read somewhere that I can use echo to mimic user input as follows:
java myProgram
echo 1000
echo
However this doesn't work for me, the program is still waiting for the
user input. Is there something I'm doing wrong? I can't imagine this is a
difficult task.
No comments:
Post a Comment