[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: M-x sort-fields
From: |
Barry Margolin |
Subject: |
Re: M-x sort-fields |
Date: |
Thu, 21 Nov 2002 23:58:36 GMT |
In article <mailman.1037917702.29749.help-gnu-emacs@gnu.org>,
<Raimund.Kohl@freenet.de> wrote:
>Hello,
>
>I do have files with coloumns of either text or digits and want to sort
>them by date. How do I do that? If I use M-x sort-field it doesn't accept
>a numeric argument ... at least not the way I try to put it in. Here an
>example:
>
>blahblah & 12.2. & 132,40 & 10,20
>blubblub & 15.5. & 15,40 & 2,23
>bleblebb & 1.4. & 10,00 & 1,00
>
>I want to sort the lines according the date of the third column (given the
>"&" sign is a column of it's own). If I understood the manual correctly I
>am to mark the "b" of the first line and the "0" of the last line and then
>command M-x sort-fields with the column as a numeric argument to which it
>all lines shall become sorted. Anybody to help me here?
M-3 M-x sort-fields
is the way to specify that it should sort on column 3. When I do that, I
get:
>bleblebb & 1.4. & 10,00 & 1,00
>blahblah & 12.2. & 132,40 & 10,20
>blubblub & 15.5. & 15,40 & 2,23
Note that the sort is lexicographic, not numeric, so 8.4 will go *after*
12.2.
--
Barry Margolin, barmar@genuity.net
Genuity, Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.
- M-x sort-fields, Raimund . Kohl, 2002/11/21
- Re: M-x sort-fields,
Barry Margolin <=