I know this is a dumb error, but I could find the solution yet.
I have to compare the apache version. If the apache version is greater than 2.4.3 I have to instal apr in the system before installing apache.
But for some reason I get an arithmetic error in the comparison.
Basically, I get the apache version and I have to compare it to 2.4.3
This is the test script:
#!/bin/ksh
version="2.4.4"
echo "$version"
#if [ '2.4.3' == "$version" ] || [ '2.4.3' < "$version" ]
if [ '2.4.3' -gt '$version' ]
then
print "Mayor or equal"
else
print "Error"
fi
This is the output:
2.4.4
./test9.sh[9]: [: 2.4.3: arithmetic syntax error
Error
I would like to know why I can't make the comparison?
Thanks