I have a binary file on Unix, which when executed asks the user for inputs. The inputs to this binary file are given manually. I want to automate the procedure, since I know the inputs already. I can't modify the binary file. How can I do this ? Is this possible via shell script or even with ant
targets ?
Tell me more
×
Unix & Linux Stack Exchange is a question and answer site for
users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.
|
||||
|
If the program reads from standard input (as opposed to direct from the terminal), you could do something like
A here document may be more readable:
(You can pick any string instead of If you need more complex interaction then an |
||||
|
If you have many inputs, you can also put these inputs into a file
And call binary like this :
|
|||
|