Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

unix script to interact with program

Status
Not open for further replies.

SirCharles

Programmer
Jun 10, 2002
212
US
I'd like to write a batch job to invoke a program
and then supply prompted for information. I'd like to do this in batch mode,
so I don't have to interact with the program on every invokation. I'd like the script to do that for me. Anyone done this one? I tried just invoking the program
from a script and then echoing lines after that in
sh, but stuff didn't echo until after I manually interacted
with program to answer prompts.

So, question is 'How to invoke program and give it information prompted for by program in batch mode?
 
myProgram <<EOF
answer1
answer2
answerN
EOF

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top