coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[coreutils] Re: added some options to uniq


From: Eric Blake
Subject: [coreutils] Re: added some options to uniq
Date: Mon, 23 Aug 2010 07:52:21 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666

[adding the mailing list]

According to Karl Berry on 8/21/2010 4:18 PM:
> Hi Adam,
> 
> Thanks for the code.  I'm cc-ing the coreutils maintainers, who will
> take it from here.

Hello Adam, I've taken the liberty to forward your original message on to
the coreutils mailing list.

>     I wanted to add a couple of options to the coreutils command 'uniq', so
> I did.
>     I added a -p / --zero-padded option which zero pads the --count so it
> can again be sorted, thus sorting by number of occurances,

sort already has enough power to sort space-padded numbers.  In general,
we are reluctant to add new options to one tool when another tool already
has existing options to solve the same problem.  If you need help figuring
out how to use sort to manipulate the output of uniq, then give an example
of what you are doing, what you got, and what you want.

> and I also add a
> -mN / --min-count=N option which will only print lines that have at least N
> occurances. I figured it is a fairly trivial change to an existing project,
> so I didn't fill out that entire form you have on the site. I've attached
> the changed uniq.c

The idea of --min-count may make more sense, although it is probably a bit
premature to burn the short option -m until we have more of an idea on how
often it is used.  Is there any other implementation (like BSD) that
already provides this functionality (not strictly necessary, but it does
add leverage to any request for an additional option).

Rather than attaching the entire modified file, could you instead attach
just the diff?  Also, splitting your changes into two diffs, one for
--min-count and one for --zero-padded, will make reviewing the two
independent features easier.  Also, you cannot add new features without
also touching NEWS and coreutils.texi; and preferably also adding to the
testsuite to ensure we don't regress.  Furthermore, it sounds like your
changes will probably be non-trivial; are you willing to start the
paperwork process to assign copyright to the FSF?

More details about the coreutils patch submission process can be found here:
http://git.sv.gnu.org/cgit/coreutils.git/tree/HACKING

-- 
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]