[20191125]18c oraversion.txt

lfree發表於2019-11-25

[20191125]18c oraversion.txt

--//18c提供使用程式顯示oracle版本號.有時候顯示測試環境需要,12c以上查詢v$version輸出有點長.
--//簡單做一個記錄:

$ oraversion
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.

--//各個引數輸出如下:

$ oraversion | grep "^-[^h]" | cut -f1 -d: | xargs -IQ bash -c "echo -n  Q =  ; oraversion Q "
-compositeVersion =18.3.0.0.0
-baseVersion =18.0.0.0.0
-majorVersion =18
-buildStamp =180628094320
-buildDescription =Release_Update

--//也可以將引數連在一起:
$ oraversion | grep "^-[^h]" | cut -f1 -d: | paste -sd" " | xargs -IQ bash -c "oraversion Q"
18.3.0.0.0
18.0.0.0.0
18
180628094320
Release_Update

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2665494/,如需轉載,請註明出處,否則將追究法律責任。

相關文章