[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [wish] sort : what about randomization ?
From: |
Paul Eggert |
Subject: |
Re: [wish] sort : what about randomization ? |
Date: |
17 Jul 2003 15:44:14 -0700 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
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.
Or perhaps we should have a different program (unsort? assort?) instead.
--- ../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