coreutils
[Top][All Lists]
Advanced

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

Re: Coreutils-gotchas


From: Assaf Gordon
Subject: Re: Coreutils-gotchas
Date: Mon, 30 Nov 2015 14:30:06 -0500

> On Nov 30, 2015, at 13:27, Pádraig Brady <address@hidden> 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

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