I am trying to connect sqlplus by passing credentials as a parameter using getopts method-
Code:
while getopts ":o:s:t::i::p::f::" opt; do
case "$opt" in
o) uname=$OPTARG ;;
s) sname=$OPTARG ;;
t) password=$OPTARG ;;
i) ip=$OPTARG ;;
p) port=$OPTARG;;
f) sid=$OPTARG;;
?) echo "I Don't Know What $OPTARG it is"
esac
done
sqlplus -silent $uname/$password@$ip:$port/$sid
N when I am running this script as -
../a.sh -o otv4 -s OTV4 -t Password12356/$ -i 10.10.98.6 -p 1521 -f ortf
Its giving me Output something like this-
***
SQL*Plus: Release 18.0.0.0.0 - Production Version 18.3.0.0.0
Copyright (c) 1982, 2018, Oracle. All rights reserved.
Use SQL*Plus to execute SQL, PL/SQL and SQL*Plus statements.
Usage 1: sqlplus -H | -V
-H Displays the SQL*Plus version and the
usage help.
-V Displays the SQL*Plus version.
Usage 2: sqlplus [ [<option>] [{logon | /nolog}] [<start>] ]
<option> is: [-AC] [-C <version>] [-F] [-L] [-M "<options>"] [-NOLOGINTIME]
[-R <level>] [-S]
-AC Enable Application Continuity.
-C <version> Sets the compatibility of affected commands to the
version specified by <version>. The version has
the form "x.y[.z]". For example, -C 10.2.0
-F This option improves performance in general. It changes
the default values settings.
See SQL*Plus User's Guide for the detailed settings.
-L Attempts to log on just once, instead of
reprompting on error.
-M "<options>" Sets automatic HTML or CSV markup of output. The options
***
And not able to connect Sqlplus. Can someone please help me with this?!
Thanks in advance!