GNU bug report logs - #22057
Sort missing feature proposed

Previous Next

Package: coreutils;

Reported by: Saint Michael <venefax <at> gmail.com>

Date: Sun, 29 Nov 2015 21:34:02 UTC

Severity: wishlist

Tags: wontfix

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


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

From: Assaf Gordon <assafgordon <at> gmail.com>
To: Saint Michael <venefax <at> gmail.com>
Cc: 22057 <at> debbugs.gnu.org, Pádraig Brady <P <at> draigbrady.com>,
 Bernhard Voelker <mail <at> bernhard-voelker.de>
Subject: Re: bug#22057: Sort missing feature proposed
Date: Tue, 1 Dec 2015 09:39:45 -0500
Hello,

> On Nov 30, 2015, at 15:03, Bernhard Voelker <mail <at> bernhard-voelker.de> wrote:
> 
> On 11/30/2015 06:46 PM, Saint Michael wrote:
>> why don't we just go ahead and do it?
> 
> not everything which can be done makes sense to do, and even
> less if the functionality is already there.

Continuing Bernhard's point,
just "going ahead and doing it" is easier said than done - at 141KB of C code, "sort.c" is a complicated program. There are many edge-cases that need to be handled properly, and several non-trivial usage cases.

That being said, a working high-quality patch is worth a thousands words, and if you (or others) implement such a feature, it will make a stronger case for inclusion.

If you do intend to pursue this course, here are some pointers:

This is a sort source code:
  http://git.savannah.gnu.org/cgit/coreutils.git/tree/src/sort.c
Or in a slightly more informative source-code viewer:
  http://lingrok.org/xref/coreutils/src/sort.c

There have been few past attempts at such patches (myself included):
 http://lists.gnu.org/archive/html/coreutils/2010-11/msg00078.html
 http://lists.gnu.org/archive/html/coreutils/2010-11/msg00085.html
 http://lists.gnu.org/archive/html/coreutils/2013-01/msg00027.html

A different approach is writing wrapper-scripts adding the "--header" option
(disclaimer: this one is mine, but there are many other variations out there):
  https://github.com/agordon/bin_scripts/blob/master/scripts/sort-header.in

regards,
 - assaf







This bug report was last modified 6 years and 210 days ago.

Previous Next


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