I get the version of IHS and JAVA by running the script
/ihs_home/HTTPServer/bin/versionInfo.sh
It prints different outputs for different version of IBM HTTP Server products.
Sample extract from the output is below:
.....
Installed Product
--------------------------------------------------------------------------------
Name IBM SDK, Java Technology Edition, Version 8
Version 8.0.3.0
ID JAVA8
Build Level pxa6480sr3ifix-20160615_01
Build Date 06/15/16
Architecture x86-64 (64 bit)
Installed Product
--------------------------------------------------------------------------------
Name IBM HTTP Server for WebSphere Application Server
Version 9.0.5.3
ID IHS
Build Level f5032008.04
Build Date 2/26/20
Package com.ibm.websphere.IHS.v90_9.0.5003.20200226_0941
Architecture x86-64 (64 bit)
Installed Features Core runtime
--------------------------------------------------------------------------------
.....
In the above output, the JDK version is displayed before the WEBSPHERE(IHS) version.
Unfortunately, with different versions of this IBM product, the output may change and it may display the JDK version after the WEBSPHERE(IHS) version.
Thus,
/ihs_home/HTTPServer/bin/versionInfo.sh | grep -v Directory | grep -v reporter | grep -i version
Output:
Version 8.0.3.0
Version 9.0.5.3
However, with this I cannot determine in the first Version is of WEBSPHERE(IHS) or of JDK.
I need to check if the line prior to the version contains WebSphere then the Version entry below is of websphere(ihs) else it is JDK Version
--------------------------------------------------------------------------------
Name IBM HTTP Server for WebSphere Application Server
Version 9.0.5.3
How can I get the know the websphere and JDK version for sure using versionInfo.sh script.
Can someone please suggest?
grep -A 1 WebSphere | tail -n 1? Something like that? repeat for JDK