> On Nov 30, 2015, at 13:27, Pádraig Brady <[email protected]> wrote:
> BTW this list has gone viral...

> https://www.reddit.com/r/programming/comments/3uogjv/gnu_coreutils_gotchas/

Glossing over the reddit discussion, there's a thread about "sort -R"
not being always perfect randomness,
pointing to this Debian bugreport/discussion:
 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=641166


Perhaps that could be added as another gothca?

   sort -R:
     sorts by random order of the *hashed values* of the keys,
     which under certain circumstances could lead to lines
     being grouped together.

     for perfect randomness, prefer 'shuf' .


Also possible (perhaps more of a 'tip' than a 'gotcha', but could help users):

    shuf -n NUM:
      starting with GNU coreutils 8.22 (released Dec-2013), 'shuf -n NUM'
      can shuffle any input size, regardless of the available memory.


regards,
 - assaf



Reply via email to