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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

answering a question in a script

Status
Not open for further replies.

yaway

IS-IT--Management
Aug 7, 2003
12
US
I need help putting a return or a Y in my script so it can auto answer questions from my software.

Thank You In Advance
 
and what about something like:
Code:
echo "Y" | /path/to/yoursoftwareprog

Hope This Help
PH.
 
Hi,

Try this:

cd /program/to/run
./program_name<<eof
Y
N

Y
eof

That should answer your script question. Enter just use empty line.

feroz
 
Hi yaway

Here is the simplest script to meet your requirement.

#!/bin/ksh
cd /path
command syntax or program.ksh <<EOJ
Y
EOJ
#End of the script

OR

you CAN GO WITH PHV's input for simplicity...

sushveer
IBM certified specialist-p-series AIX5L System Administration
AIX/SOLARIS/WEBSPHERE-MQ/TIVOLI Administrator
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top