vendredi 27 avril 2018

Linux using file for random sort not working sort --random_source=FILE

I am playing around with the sort command for Linux.

I have file1:

one
two
three
four
five

I tried:

sort -R file

The output of that command is always sorted randomly as expected

I then tried:

sort --random-source=/dev/urandom file1

and the command always has this output:

five
four
one
three
two

Why is the last sort command output always the same? Shouldn't it always be sorted randomly with this command?

Can I get an explanation on why this is occurring? Thanks.

Erik W.




Aucun commentaire:

Enregistrer un commentaire