How to capture return code of oninit shell script
Posted in 2013
Topics: General Discussion
Dear All,
Can someone share a piece of code using which I can capture the return code of
oninit command.
Actually, I am writing a shell script for performing the database startup and
i need to make sure that oninit -w command returns code = 0.
Thanks in advance
I will be looking forward for support.
Regards,
Khan
oninit -w
STATUS=$?
Cheers
Paul
> Dear All,
>
> Can someone share a piece of code using which I can capture the return
> code of
> oninit command.
>
> Actually, I am writing a shell script for performing the database startup
> and
> i need to make sure that oninit -w command returns code = 0.
>
> Thanks in advance
>
> I will be looking forward for support.
>
> Regards,
> Khan
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
--
Paul Watson
Tel: +1 913-674-0360
Mob: +1 913-387-7529
Web: www.oninit.com
www.advancedatatools.com
Failure is not as frightening as regret.
If you want to improve, be content to be thought foolish and stupid.
What this country needs are more unemployed politicians
Try:
oninit -w
if [[$? -ne 0]]; then
echo "the server did not start up!"
exit 1
fi
Art
--089e0122af068d588c04df60446d