Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Oct 2011 14:37:09 +0200
From:      Jonathan McKeown <>
Subject:   Re: cat sort(1) sort floating point numbers?
Message-ID:  <>
In-Reply-To: <>
References:  <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
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 (<>), you=
can't readily find this out from the manpage - but the info documentation=20
available on the web for coreutils describes the difference between -g=20
and -n:

[when using -n] Neither a leading =E2=80=98+=E2=80=99 nor exponential notat=
ion is recognized.=20
To compare such strings numerically, use the --general-numeric-sort (-g)=20


Want to link to this message? Use this URL: <>