unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Barry Margolin <barmar@genuity.net>
Subject: Re: M-x sort-fields
Date: Thu, 21 Nov 2002 23:58:36 GMT	[thread overview]
Message-ID: <MqeD9.46$zO5.1769@paloalto-snr1.gtei.net> (raw)
In-Reply-To: mailman.1037917702.29749.help-gnu-emacs@gnu.org

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.

       reply	other threads:[~2002-11-21 23:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1037917702.29749.help-gnu-emacs@gnu.org>
2002-11-21 23:58 ` Barry Margolin [this message]
2002-11-22 15:09   ` M-x sort-fields jrivers77
     [not found]   ` <mailman.1037978603.28367.help-gnu-emacs@gnu.org>
2002-11-24 14:46     ` Kai Großjohann
2002-11-21 23:24 Raimund.Kohl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='MqeD9.46$zO5.1769@paloalto-snr1.gtei.net' \
    --to=barmar@genuity.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).