I am trying to write this shell script to verify the version of make which is installed on the linux, but unable to get it working. It will be great if someone can point me what I am missing here.
OUTPUT="$(make --version | head -1)"
echo "${OUTPUT}" | grep -o '[0-9]*[\.][0-9]*'
OP="$(echo \"${OUTPUT}\" | grep -o '[0-9]*[\.][0-9]*')"
echo "${OP}"
if [ $OP -ge 3.82 ]; then
echo "make version is greater than or equal to 3.82"
else:
echo "make version is not greater than or equal to 3.82"
exit 1
fi