GNU bash, version 2.04.11(1)-release (i386-redhat-linux-gnu)
Copyright 1999 Free Software Foundation, Inc.
On Pentium III (Coppermine), 794.719, 255928 kB RAM
The $RANDOM is totally unusable if called with some invariable interval.
The below code is meant to produce random numbers between 1-4, but instead
it just produces a string of form i=i+1; where only the initial value of i
is random.
code:
while true; do
sleep 1;
let RND=$RANDOM%4+1
echo $RND
done
output:
4
1
2
3
4
1
2
3
4
1
2
3
4
1
2
3
4
1
2
3
4
1
2
3
4
1
2
3
4
1
2
3
and so on.
Heikki Vesalainen, Mermit
: GSM +358.50.3695362
: vesalainen@mermit.fi