Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Shell Script Heros
oracledba.amit_at_gmail.com wrote:
> Dear Sirs,
>
> I am new to shell scripting and I have to create a shell script that
> will ask the user to enter DB Sid, User Name and Password. The script
> will then validate this information.
>
> If the user input is not valid, then he should be shown a message that
> user input was not right. And if the user-input is right, then I have
> to run few scripts, after showing him a messege that his input was
> right.
>
> Any clues on how to do that would be a good help.
>
> Thanking you in anticipation.
>
> Regards,
> Amit
You could test the return code of the sqlplus executable as follows:
echo $?
0 indicates success; 1 indicates failure.
HTH -g Received on Tue Nov 07 2006 - 11:27:35 CST