Reputation: 13238
I want to conditionally execute some wlst commands based the the weblogic version. How to get the weblogic version using wlst?
Upvotes: 0
Views: 6238
Reputation: 13238
The version
command is supported by wlst.
Below is the output of version command executed with wlst (version 12.2.1)
wls:/offline> print version
WebLogic Server 12.2.1.2.0
With wlst script you can check the version and perform the version specific commands. For example, create a script called test.py
as below
weblogic_version=version
if 'WebLogic Server 12.2.1' in weblogic_version:
print "Perform commands for weblogic version 12.2.1"
else:
print "You are on required weblogic version"
You can now execute this script with wlst.sh
.../wlst.sh test.py
Ref:https://docs.oracle.com/middleware/1213/wls/WLSTC/reference.htm#WLSTC516
Upvotes: 2