Hello, 

# strings /dev/arandom | grep -o '[[:print:]]' | head -100 > a.txt 
# sort -R a.txt
K
]
U
O
B
B
~
o
o
I
I
P
s
s
Q
f
f
p
,
1
5
#
X
X
c
c
W
W
\
\
h
w
v
v
?
`
L
L
L
L
A
A
A
E
J
J
Y
$
|
!
x
2
2
2
2
(
a
q
q
q
q
3
3
7
d
+
z
z
z
S
S
S
S
F
6
=
i
i
G
G
.
.
.
:
[
[
T
 
 
{
-
}
}
}
j
j
&
9
9
9
# uname -mrs
OpenBSD 6.0 amd64
# 
# sort -R a.txt > b.txt 
# cksum b.txt           
3374888359 200 b.txt
# sort -R a.txt > b.txt 
# cksum b.txt           
109071951 200 b.txt
# sort -R a.txt > b.txt 
# cksum b.txt           
3441576000 200 b.txt
# 

from: http://man.openbsd.org/OpenBSD-current/man1/sort.1

 -R, --random-sort, --sort=random

    Sort lines in random order. This is a random permutation of the inputs with 
the exception that equal keys sort together. It is implemented by hashing the 
input keys and sorting the hash values. The hash function is randomized with 
data from arc4random_buf(3), or by file content if one is specified via 
--random-source. If multiple sort fields are specified, the same random hash 
function is used for all of them.

Although the "b.txt" differs, if we check it by the human eye... that is not 
random.. **Why**? Why is it called random, WHEN IT IS NOT RANDOM?! Random 
should mean RANDOM. Not "almost" random.. 

The same can be seen on ex.: RHEL7. 

Reply via email to