bug-coreutils
[Top][All Lists]
Advanced

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

bug#33025: Add examples of why one would want to "sort" something "rando


From: 積丹尼 Dan Jacobson
Subject: bug#33025: Add examples of why one would want to "sort" something "randomly"
Date: Sat, 13 Oct 2018 00:28:32 +0800

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!





reply via email to

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