Eric Peterson a écrit :
As for getting the proper $? return code.  I am guessing that since
the sub-process successfully finished (regardless of any exit code
sqlplus may send) it will always be 0. So I like idea of putting my code into a function, then grep -c for ORA-/PLS-/TNS-/... and then set a return code to the calling routine with the output on STDOUT or STDERR as needed.


didn't see it before, but you have to do the trick in 2 pass,
declaring the variable, the affecting it a value such as :

typeset rv=
rv=$(...)
rc=$?

instead of :

typeset rv=$(...)
rc=$?

or rc get the typeset rc and not the subshell one, so rc is always 0 !

Regards,

Cyrille Lefevre
--
mailto:[email protected]



_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users

Reply via email to