A new utility oraversion has been introduced in Oracle 18c, Which provides Oracle database version/release related information.
This program prints release version information.
These are its possible arguments:
-compositeVersion: Print the full version number: a.b.c.d.e.
-baseVersion: Print the base version number: a.0.0.0.0.
-majorVersion: Print the major version number: a.
-buildStamp: Print the date/time associated with the build.
-buildDescription: Print a description of the build.
-help: Print this message.
For displaying specific information.
$ oraversion -compositeVersion
$ oraversion -baseVersion
$ oraversion -majorVersion
$ oraversion -buildStamp
$ oraversion -buildDescription
tools DB TOOLSORACLE 18C