Created
July 3, 2019 14:25
-
-
Save william-reed/82a7a8aa3e9683ede3b9e878bf4f4641 to your computer and use it in GitHub Desktop.
Get major java version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JAVA_VERSION=$(java -version 2>&1 | awk 'NR==1{ gsub(/"/,""); print $3 }' | cut -f1 -d".") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment