I noticed that on some machines (all openSUSE 11.2 on the same hardware), each Bash shell outputs the same sequence of values ββfor $RANDOM :
$ bash -c 'for i in `seq 10`; do echo -n "$RANDOM "; done; echo' 17767 9158 6249 18547 23633 23807 5194 22764 7977 31949 $ bash -c 'for i in `seq 10`; do echo -n "$RANDOM "; done; echo' 17767 9158 6249 18547 23633 23807 5194 22764 7977 31949
The sequence is the same for all of these machines. It seems that the random number generator is not sown? Why is this happening and how to fix it?
On my personal machine, the numbers change every time I call the command above.
source share