Generating random numbers is common recruitment in number of scripts. bash by default gives a variable $RANDOM which when accessed gives a random number between 0 and 32767.
There might be situations where we might need random numbers between a range of smaller numbers or between zero and a smaller number than 32767. Here is a script which can be used to generate random numbers between any range of numbers.
It takes as input the lower limit and the upper limit of the random numbers required and then generates the required number of random numbers with in the range.
random_numbers
There might be situations where we might need random numbers between a range of smaller numbers or between zero and a smaller number than 32767. Here is a script which can be used to generate random numbers between any range of numbers.
It takes as input the lower limit and the upper limit of the random numbers required and then generates the required number of random numbers with in the range.
random_numbers
No comments:
Post a Comment