SL8R.co.uk - Code Zone

Code, Code and Code

SL8R.co.uk - Code Zone header image 4

Shell Script: Random Number

April 5th, 2008 · 2 Comments

To get a random number at a shell script in Unix (I tried this on AIX 5 and it worked) use $RANDOM
echo $RANDOM
26558
echo $RANDOM
16737
echo $RANDOM
11669

addthis_url = ‘http%3A%2F%2Fwww.sl8r.co.uk%2F2008%2F04%2F05%2Fshell-script-random-number%2F’;
addthis_title = ‘Shell+Script%3A+Random+Number’;
addthis_pub = ”;

[Read more →]

Tags: Code