|
I'm assuming that...
program << eof >> $result 2>&1
...is inside a shell script.
In this script, you would simply enter the
actual responses thar "program" reads...
program << eof >> $result 2>&1
answer1
answer2
...
answer5
eof
The "<< eof" creates a "here document" which
basically says, redirect the standard input
to "program" to everything between the "eof"'s
The ">> $result says append the standard
output of "program" to whatever file $result
points to.
|