In my ksh script I have the parameter VERSION=3.9.2X. $VERSION always start with 3.9.2 and X could be any number integer or float number.
The following irregular ksh syntax works fine for any X integer number/s but not for float numbers (for example it doesn’t work for X=2.34 or X=22.123)
What do I need to add in my syntax in order to support float numbers?
[[ $VERSION = 3.9.2*([0-9]) ]] && echo right version
- remark – X could have the character “-“
Example of $VERSION values that could be
VERSION=3.9.22.34-3
VERSION=3.9.20.34.3
VERSION=3.9.29.34-3
VERSION=3.9.212.3.4-3
VERSION=3.9.21.34.2-3.3
VERSION=3.9.273
VERSION=3.9.210.3
is this what you want? not sure…
EDIT
EDIT2