[ucd@ucd1 svnVersion]$ cat a4.sh
java_version='1.8.2';
if [[ $java_version =~ ^1.8 ]]
then
echo 'aaaaaaaaaa'
else
echo 'bbbbbbbbb'
fi
[ucd@ucd1 svnVersion]$
[ucd@ucd1 svnVersion]$ sh ./a4.sh
aaaaaaaaaa
[ucd@ucd1 svnVersion]$ cat a4.sh
java_version='3.1.8.2';
if [[ $java_version =~ ^1.8 ]]
then
echo 'aaaaaaaaaa'
else
echo 'bbbbbbbbb'
fi
[ucd@ucd1 svnVersion]$ sh ./a4.sh
bbbbbbbbb
[ucd@ucd1 svnVersion]$ cat a4.sh
java_version='3.1.8.2';
if [[ $java_version =~ 1.8 ]]
then
echo 'aaaaaaaaaa'
else
echo 'bbbbbbbbb'
fi