Computing.Net > Forums > Unix > Unix Shell program

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Unix Shell program

Reply to Message Icon

Name: saran
Date: July 8, 2002 at 01:57:25 Pacific
Comment:

How to pass the value in interactive mode?

Example: when i run a PGP application, its asking message 'Yes' or 'NO'.But i want to pass the value 'YES' in shell Program.
please help me .. Thanks



Sponsored Link
Ads by Google

Response Number 1
Name: PaulS
Date: July 8, 2002 at 06:48:25 Pacific
Reply:

Use "read"

echo "Enter yes/no: \c"
read ANSWER
if [ "$ANSWER" = yes ]
then
.............
fi

If that is not what you are after then maybe you want a here-document.

program << EOF
yes
EOF


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: Unix Shell program

Unix Shell Program www.computing.net/answers/unix/unix-shell-program/4881.html

Shell Programming www.computing.net/answers/unix/shell-programming/1017.html

unix shell programs www.computing.net/answers/unix/unix-shell-programs/4925.html