bug-coreutils
[Top][All Lists]
Advanced

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

Re: new coreutil? shuffle - randomize file contents


From: P
Subject: Re: new coreutil? shuffle - randomize file contents
Date: Tue, 24 May 2005 11:25:48 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040124

James Youngman wrote:
Davis Houlton writes:-



I recently had to write a shuffle utility for a personal project and
was wondering if it would make a canidate for the coreutils
suite. It seems like the kind of utility the toolbox could use
(maybe under section 3. Output of entire files).


This behaviour was proposed a few months ago as a new option to
"sort", and there were objections around the ideas of keeping the
shuffled sort stable (i.e. that lines with the same key should appear
in groups in the shuffled output) and of repeatability (e.g. giving a
'random seed' to ensure output is reproducible[*]).  Much discussion
followed and eneded up with many people agreeing that this behaviour
properly belonged in a a separate program.

So, I think that "shuffle" is a good idea.

I don't agree. You just end up duplicating
99% of the sort logic. Logically the only difference from sort
is the low level ordering algorithm. so I vote for and extra arg to sort: --sort="random". Another arg to the --sort option could be,
"version" which would sort files with version numbers in their name
appropriately.

Pádraig.




reply via email to

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