All,
Due to all the issues I've encountered with MySQL at:
https://www.linuxquestions.org/quest...ms-4175637410/
I've downloaded all the tar and deb files from 5.5 to 8.0, so have been writing a BASH script to install each version to find where it actually breaks.
Problem is I'm getting errors from my script at this section:
Code:
ver=$1;
echo "Ver=> $ver";
if [ $ver >= "5.5" ] && [ $ver < "6" ]; then
src_dir='/home/path/MySQL/5.5+/';
elif [[ $ver >= "6" ] && [ $ver < "7" ]]; then
src_dir='/home/path/MySQL/6.0/';
elif [[ $ver -ge "7" && $ver -lt "8" ]]; then
src_dir='/home/path/MySQL/7.0/';
elif [ $ver -ge "8" ]; then
src_dir='/home/path/MySQL/8.0/';
else
echo "No correct version entered!";
exit;
fi
You can see I've tried double brackets and the "-ge", "-lt" vs ">=", "<" the other and always get errors, so need some help on the syntax here, cause not figuring it out.
Output & Errors are:
Quote:
bash /Scripts/MySQL/mysql_ins.sh 5.5
Ver=> 5.5
/Scripts/MySQL/mysql_ins.sh: line 8: [: 5.5: unary operator expected
/Scripts/MySQL/mysql_ins.sh: line 10: [: missing `]'
/Scripts/MySQL/mysql_ins.sh: line 12: [: missing `]'
/Scripts/MySQL/mysql_ins.sh: line 14: [: 5.5: integer expression expected
No correct version entered!
|
Cheers!
TBNK