Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: SQL*Plus question - a bit urgent - Can we suppress 'Connected
My reply was probably a bit too brief. The most robust way for doing this
would be to use pattern matching utilities such as sed and awk (Perl? What's
Perl?) to parse that output for stuff like
ORA-NNNN (N is a digit of a number)
TNS-NNNN
SP-NNNN
etc.
But for a quick and dirty approach, select an additional dummy word in the select statement then parse for that word as the first word in the line; that's what the "read" statement does for you. You could add another condition outside the "while read" loop to see if the value you got is reasonable. For example set MY_VARIABLE='BROKE' before running sqlplus, then see if MY_VARIABLE is still BROKE or empty when the loop is done.
> -----Original Message-----
>
> I take back that statement of mine. Gotta take Unix lessons.
>
-- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: <Stephen.Lee_at_DTAG.Com INET: Stephen.Lee_at_DTAG.Com Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Thu Nov 06 2003 - 08:54:28 CST
![]() |
![]() |