[prev in list] [next in list] [prev in thread] [next in thread] 

List:       coreutils-bug
Subject:    bug#22057: Sort missing feature proposed
From:       Assaf Gordon <assafgordon () gmail ! com>
Date:       2015-12-01 14:39:45
Message-ID: E792FACD-55E2-4F8B-AB6F-D15C44F9A628 () gmail ! com
[Download RAW message or body]

Hello,

> On Nov 30, 2015, at 15:03, Bernhard Voelker <mail@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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic