Hi,
I have an executable that takes user input in the form of things like 'y' and 1 or maybe a string of text occasionally. I would like to write a UNIX script that calls this program - which is no problem. But, I would like to have this script provide the input the program needs as well. I'm not talking about args on the command line, I mean there are actual reads from the program.
I have tried to echo the responses in reverse order and pipe it to the executable...
(echo y;echo 1) | execprog
I have seen that work on other programs but it doesn't seem to work in this case. I know for sure the executable is a C program - although I didn't write it nor do I have the source code.
Any help would be great. Thanks.
-Tyler
I have an executable that takes user input in the form of things like 'y' and 1 or maybe a string of text occasionally. I would like to write a UNIX script that calls this program - which is no problem. But, I would like to have this script provide the input the program needs as well. I'm not talking about args on the command line, I mean there are actual reads from the program.
I have tried to echo the responses in reverse order and pipe it to the executable...
(echo y;echo 1) | execprog
I have seen that work on other programs but it doesn't seem to work in this case. I know for sure the executable is a C program - although I didn't write it nor do I have the source code.
Any help would be great. Thanks.
-Tyler