Article 56Y21 Random

Random

by
vmill
from LinuxQuestions.org on (#56Y21)
Not sure if programming forum is best but I am trying a simple script on Fedora for a random number generator. I know it is not truly random and am ok with a cheesy hack.

I searched and found "generate random number in specific range" examples:
generating a random number between 11 and 30: echo $[ $RANDOM % 20 + 11 ]

It seems to work, but where does 20 come into anything? In other examples I found, the first number is the high end of the range. If I wanted something random between 10 & 15 what would I use?

Confusedlatest?d=yIl2AUoC8zA latest?i=gcmgeocpIDM:B70zN9Yw0VY:F7zBnMy latest?i=gcmgeocpIDM:B70zN9Yw0VY:V_sGLiP latest?d=qj6IDK7rITs latest?i=gcmgeocpIDM:B70zN9Yw0VY:gIN9vFwgcmgeocpIDM
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments