[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Makes sort create random order
From: |
Thomas Habets |
Subject: |
[PATCH] Makes sort create random order |
Date: |
Wed, 25 Aug 2004 16:14:15 +0200 |
User-agent: |
KMail/1.6.2 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
(if this email goes to a mailinglist then I'm not on it. Please CC any replies
if that is the case)
Yes, random order. That's not a bit oxymoronic.
Why "sort randomly" you ask? Well, let's say you have a bunch of test-data,
one per line (where "a bunch" is millions, and "millions" is, oh, 2.6
million).
Let's then say these line of data, as they are now, were generated
sequentially, and you want to fetch them randomly, one at a time. All. And no
duplicates.
So, added -R, --random.
I also shamelessly added myself to THANKS.
Note that I use rand() and srand(), if that matters on some OS.
Be good.
- ---------
typedef struct me_s {
char name[] = { "Thomas Habets" };
char email[] = { "address@hidden" };
char kernel[] = { "Linux 2.4" };
char *pgpKey[] = { "http://www.habets.pp.se/pubkey.txt" };
char pgp[] = { "A8A3 D1DD 4AE0 8467 7FDE 0945 286A E90A AD48 E854" };
char coolcmd[] = { "echo '. ./_&. ./_'>_;. ./_" };
} me_t;
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
iD8DBQFBLJ63KGrpCq1I6FQRAn2lAKCfncPqrFgH3P99gzZb+02d4zRMAgCfcpe3
hwGkiGY0Pfu3g0WWkYRnii0=
=3xpb
-----END PGP SIGNATURE-----
coreutils-sort-random.patch
Description: Text Data
- [PATCH] Makes sort create random order,
Thomas Habets <=