Here's the deal. I have a program that I want to run. This program takes input from stdin at various times.
I want to be able to run this program but have another program, or preferably a shell sript, handle the job of sending input to this programs stdin. Basically, the program I am running is a kind of simulator. It will eventually run in an embedded system and it will get its input from another chip. The simulator allows me to test the code in linux but it's a pain in the butt having to keep sending the program the lines it requires as responses to the commands it sends out (all ascii text). I'd much rather be able to put together a couple scripts that run the program and then send it ascii strings at various times (when the program sends out a command, I want to be able to automatically answer this via a script).
This doesn't have to be smart at all. The script can be programmed to send responses at various times (i.e. wait 10 seconds then send response).
So far I can see how to pipe the output of a command to the input of another command or how to redirect stdout to a file but what I need to do is to have a script send input to stdin of another program.
That's it, thanks