Sometimes when you are programming with shell script, it is really difficult to get random number because there is no random function available.
Shell script is not for advance level programming.
Here is the code for it.
var=$(dd if=/dev/urandom count=1 2> /dev/null | cksum | cut -f1 -d" " | cut -c 3-5);
It will give you 3 digit random number which will be stored in $var variable
Circle Through Three Points c math programming