declare -a kernel_version
IFS=.-~ read -r -a kernel_version < <(uname -r)
if (( kernel_version[0] >= 5 || (kernel_version[0] >= 4 && kernel_version[1] >=13) )); then
:
fi
BashSupport Pro (v1.5) is doesn’t seem to recognice that ${kernel_version} has been used and reports it as an unused local variable. If this isn’t already fixed in v2.0, could it be?
Fixed for 2.0 now. Thanks for reporting!
Variables defined by “read -a var_name” are supported now as well as indexed variable references in arithmetic expressions, e.g. (( kernel_version[0] )), etc.
Thanks for testing! I’ll publish a new beta soon, beta4 has a few issues. I had to add a few things to handle the trial duration of beta builds, but should have this ready soon for a new build.
Hi Joachim
I have updated to beta5 this morning and can confirm that the issue above is resolved, thanks!
I also see that another issue that was affecting my code, multi-line “To Do” items is also resolved - great.
Cheers
Bruce