Tuesday, 22 December 2015

Get oracle version number in linux shell script

Get oracle version number in linux shell script

below command will provide you the version number as output
just make sure that your ORACLE_HOME path is set in ~/.base_profile file.

you can check it by

echo $ORACLE_HOME


echo $ORACLE_HOME | awk -F "/product/" '{print $2}' | cut -d'/' -f1