mochahochabeachside.com

Tag: shell scripts

Testing Random Randomness…

by on Feb.10, 2009, under Scripts

A post at Manik 2.0 got me thinking on whether or not the $RANDOM variable in bash was really all that random.  So, I created a little test script.  It's quite simple.  It accepts a command line argument for number of loops. Then, each loop, it assigns a random number to $RANDTEST, and then compares $RANDTEST to $RANDOM. Since $RANDOM changes every time, it should never, ever match.

(continue reading...)

Leave a Comment :, more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...