On Tue, Jan 13, 2009 at 9:52 AM, P.V.Anthony <[email protected]>wrote:

> <[email protected]>> In this case, "sort -n -t . +2"  seems to do the trick
> nicely.  -n to
> > make the sort numeric, and -t . +2 to use period as the field delimiter
> > and to sort on the second field.
>
> Thank you for replying.
>
> On my Gentoo, the script did not work. Sort does not like "+2". Tried
> using -k option but that too did not give the correct sorting.
>

Oops, +2 is BSD sort syntax.  With gnu sort, use -k and be aware that it
starts counting from 1 (starts from 0 for BSD sort).  Hence, sort -n -t . -k
3
_______________________________________________
Slugnet mailing list
[email protected]
http://wiki.lugs.org.sg/LugsMailingListFaq
http://www.lugs.org.sg/mailman/listinfo/slugnet

Reply via email to