I have a C program in which I use scanf
to get user input. Now, I would like to make a .sh script that automatically test this program with pre-defined user input, but I'm not sure how I can send the input every time the program needs it.
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 you need to have an automated conversation with your program (i.e. want to interpret the output as well), take a look at expect. This is a tcl based tool for automating interactive sessions. It might give you what you want. |
|||
|