From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Barry Margolin Newsgroups: gmane.emacs.help Subject: Re: M-x sort-fields Date: Thu, 21 Nov 2002 23:58:36 GMT Organization: Genuity, Woburn, MA Sender: help-gnu-emacs-admin@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1037923989 14009 80.91.224.249 (22 Nov 2002 00:13:09 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 22 Nov 2002 00:13:09 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18F1RT-0003dn-00 for ; Fri, 22 Nov 2002 01:13:07 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 18F1Pt-00074T-00; Thu, 21 Nov 2002 19:11:29 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!bloom-beacon.mit.edu!nycmny1-snh1.gtei.net!washdc3-snh1.gtei.net!crtntx1-snh1.gtei.net!news.gtei.net!paloalto-snr1.gtei.net.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Mail-Copies-To: never X-Newsreader: trn 4.0-test72 (19 April 1999) Originator: barmar@genuity.net (Barry Margolin) Original-Lines: 36 Original-X-Trace: /bCCZE5gkUkqKJ9tBhTLcAYMChh+6MSF+qyoGec61m0hv9BbbGZyF7/NeOKsZRWOdx6bAA+tmqsv!ZOQUVg82W0BXkddaabtnILL7zxN0LsjVSogxGhZjCawVDurlGgnyH0QlCFqZfaPuvlKmMHohamD0!wpSVjwpUgIEXxA== Original-X-Complaints-To: abuse@gte.net X-Abuse-Info: Please be sure to forward a copy of ALL headers X-Abuse-Info: Otherwise we will be unable to process your complaint properly Original-NNTP-Posting-Date: Thu, 21 Nov 2002 23:58:36 GMT Original-Distribution: world Original-Xref: shelby.stanford.edu gnu.emacs.help:107292 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:3848 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:3848 In article , 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.