I have an array
arr=( x11 y12 x21 y22 x31 y32)
I need to sort this array to
x11 x21 x31 y12 y22 y32
So, I need to sort both alphabetical and numerical wise
How do I perform this in shell script ?
If I use [ $i -le $j ], it says "integer expression expected".
And the strings may contain other characters also: x.1.1 or 1.x.1.
How do I do this ?