Problom Sorting

hi all,

i have the test data file which is . seperated as below and i need sort it
EX data:
5.4.11.3
5.4.2.2

after sort result should look like
5.4.2.2
5.4.11.3

thanks in advance.

Try...

sort -t "." -k1,1n -k2,2n -k3,3n -k4,4n

thanks for reply, this will work ,
but the problom is no of decimal places is really not fixed...
itcan have a singlr char in between as well
ex:
5.4.11.4-v2.2
5.4.2.1-v2.2

any suggestions on how to sort this kind of input.