Kbase P81115: How to give on the command line the answer to a question, for Unix./Linux
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/16/2008 |
|
Status: Unverified
GOAL:
How to give on the command line the answer to a question, for Unix.
GOAL:
How do I create a Unix batch file that can answer prompts?
FIX:
In order to accomplish this, there are two solutions.
The second solution allows to answer to more than one question, while having a line for each prompt within a file.
The given sample is on proutil <db> -C conv89 where you get the message:
You must have your database backed up before running the conversion. (1024)
Have you done this (y
) ?
SOLUTION 1:
1) Run
echo 'y' | proutil sports -C conv89
SOLUTION 2:
1) Create a file, named "yes" in this example, with a line containing 'y' .
Unix/Linux> cat yes
y
Unix/Linux>
2) Run
proutil sports -C conv89 < yes