#!/bin/bash
#$RANDOM 5 bit random number
#random one parameter integer
random()
{
systemRandom=$RANDOM;
myRandom=$(($systemRandom%$1));
echo $myRandom;
}
out=$(random 3);
if [ $out -eq 0 ] ; then
echo $out;
elif [ $out -eq 1 ] ; then
echo $out;
elif [ $out -eq 2 ] ; then
echo $out;
elif [ $out -eq 3 ] ; then
echo $out;
fi
for (( i = 0; i < 10 ; i ++ ))
do
echo $i , $(random 10);
done