How2 validate connection string in unix shell script
754269Feb 17 2010 — edited Feb 17 2010I'm writing a unix shell script that will get the user/passwd/instance from user, form a connect string, and pass it to sqlplus. Now I want to validate if a proper/valid connection string was formed. Basically I want to do something like below
sqlplus -s $CONN_STR
and disconnect if valid string and still disconnect and return to prompt if not a valid string.
Is there a clean way I can check if the return was after a successful connect, and how to disconnect it in script and check that if an invalid string.