0

In shell script I want to compare the system Java version with another Java version which I want and install if both are not same. I tried by using

java -version  
head -1 file | cut -d' ' -f3
VERSION='1.8.0_1'
if [ $output -lt $VERSION ]then
sudo apt-get install default-jre
Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Pratik
  • 9
  • 1

0 Answers0