GNU bug report logs -
#33025
doc: sort: add examples for -R/--random sort
Previous Next
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
On (info "(coreutils) sort invocation")
‘-R’
‘--random-sort’
‘--sort=random’
Sort by hashing the input keys and then sorting the hash values.
Choose the hash function at random, ensuring that it is free of
collisions so that differing keys have differing hash values. This
is like a random permutation of the inputs (*note shuf
invocation::), except that keys with the same value sort
together...
OK, but you need to mention some examples of why someone would want to
"sort" something "randomly".
OK, I have one:
You have a list of URLs.
You know there are probably duplicates in there, that you want to get
rid of.
But you also don't want to make it look like you have "machine sorted
them." You want them to still look "hand assembled."
So you use sort --random-sort --unique on them!
This bug report was last modified 6 years and 169 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.