On Monday 03 October 2011 14:05:42 Anton Shterenlikht wrote: > I tried sorting a file with a column of floating > point numbers (below) with sort(1) -n. However, > the numbers seem to have been sorted by the first > digit only.
sort -g Due to the GNU project's obsession with info (<http://xkcd.com/912/>), you can't readily find this out from the manpage - but the info documentation available on the web for coreutils describes the difference between -g and -n: [when using -n] Neither a leading ‘+’ nor exponential notation is recognized. To compare such strings numerically, use the --general-numeric-sort (-g) option. Jonathan _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"