[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [wish] sort : what about randomization ?
From: |
Jim Meyering |
Subject: |
Re: [wish] sort : what about randomization ? |
Date: |
Fri, 18 Jul 2003 08:54:23 +0200 |
Paul Eggert <address@hidden> wrote:
> It'd be an amusing option to build, albeit not as easy as one might
> think at first glance. Here's a proposed addition to the coreutils
> TODO list.
This functionality has been requested often enough that I suspect the
alternatives (scripts galore and programs like bogosort) aren't widely
available. I've added it.
> Or perhaps we should have a different program (unsort? assort?) instead.
If it's not too invasive, I like the idea of adding it to sort,
since, as Stepan suggested, it could then be used to operate on
individual fields along with other sorting options.
> --- ../coreutils/TODO Mon Jul 14 11:39:37 2003
> +++ TODO Thu Jul 17 15:42:57 2003
> @@ -86,3 +86,13 @@ sort: Compress temporary files when doin
> This improves performance when you can compress/uncompress faster than
> you can read/write, which is common in these days of fast CPUs.
> suggestion from Charles Randall on 2001-08-10
> +
> +sort: Add an ordering option -R that causes 'sort' to sort according
> + to a random permutation of the correct sort order. Also, add an
> + option --random-seed=SEED that causes 'sort' to use an arbitrary
> + string SEED to select which permutations to use, in a deterministic
> + manner: that is, if you sort a permutation of the same input file
> + with the same --random-seed=SEED option twice, you'll get the same
> + output. The default SEED is chosen at random, and contains enough
> + information to ensure that the output permutation is random.
> + suggestion from Feth AREZKI, Stephan Kasal, and Paul Eggert on 2003-07-17