Command:
$ cat rand_nobias.sh
Result:
#!/bin/sh
$ cat rand_nobias.sh
Result:
#!/bin/sh
numlines=$1;
randmax=32767;
max=$((($randmax/$numlines)*$numlines));
rand=$RANDOM;
until [ $rand -lt $max ]
do
rand=$RANDOM;
done
echo $rand;