hi,

doesnt it seem to be fine?

> Just noticed this
>
> cpu% cat tmp/sorttest
> 2
> 7
> 2.1
> 2.1.4
> 2.1.1
> cpu% sort tmp/sorttest
> 2
> 2.1
> 2.1.1
> 2.1.4
> 7
------> sorts the string values
> cpu% sort -u tmp/sorttest
> 2
> 2.1
> 2.1.1
> 2.1.4
> 7
------> sorts the string values and removes any duplicates (none here)
> cpu% sort -n tmp/sorttest
> 2
> 2.1
> 2.1.4
> 2.1.1
> 7
-----> sorts the numeric values (which is an integer or floating-point
value of format x.y)
In this case 2.1.4 is treated as 2.1 (ignores second "." and following
characters)

> cpu% sort -n -u tmp/sorttest
> 2
> 2.1
> 7
----> sorts the numeric values (which is an integer or floating-point
value of format x.y)
and removes any duplicates. In this case, 2.1, 2.1.4 and 2.1.1 are all
2.1, so removes
duplicates.

or, am i missing something?

thanks
dharani

Reply via email to