I am working on updating the EA, and stuck on format of evaluating an expression.
CURRENT_EXCEL_VERSION="15.20"
if [ -d /Applications/Microsoft Excel.app ]
then
EXCEL_VERSION=$( sudo defaults read /Applications/Microsoft Excel.app/Contents/Info.plist CFBundleShortVersionString )
else
echo "<result>OfficeNotInstalled</result>"
fi
if [ $EXCEL_VERSION -lt $CURRENT_EXCEL_VERSION ]
then
echo "<result>True</result>"
else
echo "<result>False</result>"
fi
The first "if" works as well, 2nd "if" returns "False" all the time. I understand that it is because of non-number, string value like "15.19.1" vs "15.20", but do not know how to the evaluating an expression should be changed.
Would you please help?
Thanks!
