|
It sounds like you may want a utility called expect - it lets you create fairly complex interactive dialogues with a program - from a script.
expect scripts are easier to create than C code...
The here document - do you know what those are? Will they meet your needs?
|