On 07/02/15 02:13, Assaf Gordon wrote:
> Hello,
> 
> Attached is a proof-of-concept implementation supporting '--random=seed=N' 
> option for sort/shuf/shred,
> to enable reproducible (pseudo) random runs.
> It was discussed a while ago, here:
> http://lists.gnu.org/archive/html/coreutils/2013-11/msg00068.html
> 
> comments are welcomed,

Reproducibility is a useful though not often required goal.
Playing devil's advocate, you could get it with:

  get_random() { seed="$1"; openssl enc -aes-256-ctr -pass pass:"$seed" -nosalt 
</dev/zero 2>/dev/null; }

  shuf -i1-100 --random-source=<(get_random 42)

While a separate dependency, it's widely available and we could document it.

The advantage is that it's an existing mechanism
and uses more silicon to generate the random numbers.

cheers,
Pádraig.



Reply via email to