GNU bug report logs - #6395
How sort based on a list of fields?

Previous Next

Package: coreutils;

Reported by: Peng Yu <pengyu.ut <at> gmail.com>

Date: Thu, 10 Jun 2010 17:28:02 UTC

Severity: normal

Tags: notabug

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 6395 <at> debbugs.gnu.org (full text, mbox):

From: Eric Blake <eblake <at> redhat.com>
To: Peng Yu <pengyu.ut <at> gmail.com>
Cc: 6395 <at> debbugs.gnu.org
Subject: Re: bug#6395: How sort based on a list of fields?
Date: Thu, 10 Jun 2010 11:45:16 -0600
[Message part 1 (text/plain, inline)]
On 06/10/2010 11:12 AM, Peng Yu wrote:
> Hi,
> 
> -k option of sort only allow a range of files. But I would like a list
> of fields. For example, field 7, field 3 then field 8. Would you
> please let me know how to do it?

sort -k7,7 -k3,3 -k8,8

-- 
Eric Blake   eblake <at> redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

[signature.asc (application/pgp-signature, attachment)]

This bug report was last modified 14 years and 315 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.