Re: Interactive Scripts, return codes

From: Joerg Bruehe <joerg_at_sql.de>
Date: 1997/06/06
Message-ID: <3397E94B.2D80_at_sql.de>#1/1


Hello Rodger,

the answer depends on the language/interpreter you want to use for writing your script:

- Bourne (or Korn) shell,
- C shell,
- tcl/tk
- perl
- any other I currently do not think of.

Each of these should offer you their own means to

- get user input,
- get the return code of sub-processes that terminated,
- branch or loop depending on specified conditions.

As one example, in Bourne (or Korn) shell

- 'read' is the command to get input and assign it to a variable,
- '$?' is the value of the exit code of the last sub-process,
- 'if' is the branching (plus 'case', plus loops, ...).

See the respective manual, look for applications written in that language, try to understand them, then go ahead and write your own.

Regards

Joerg

Programming wrote:
>
> ((...))
>
> At certain points in the script,
> I want to ask the user different
> questions, and accept Yes or No responses.
> How can I accomplish this, or,
> what is the command to do this?
>
> The other thing that I want to do,
> is to check the return codes from
> Oracle, and abort if the commands
> failed. How can this be accomplished?
> How could I branch to another part of
> the script?
> Would the return code be from Unix,
> or from Oracle?
>
> Sorry for such basic questions,
> I am rather new to these subjects.
>
> Thanks in Advance,
>
> Rodger Lepinsky
> ADP Systems Partnership
> Winnipeg, Manitoba, Canada
 

-- 
Joerg Bruehe, SQL Datenbanksysteme, Berlin (Germany)
    (speaking entirely for himself)
email: joerg_at_sql.de
Received on Fri Jun 06 1997 - 00:00:00 CEST

Original text of this message