Generating random numbers in UNIX shell:

`\$ RANDOM=12345\$ echo \$RANDOM5758\$ echo \$RANDOM10207\$ echo \$RANDOM7212\$ echo \$RANDOM25339`

To "seed" the RANDOM number (i.e., to get it started), you first initialize it (typically with an odd number -- or even better with a prime -- though usually the writers of the code use a prime base, whence primality of the seed is less relevant). Initialization with the same number each time will give the same sequence of random numbers (which can be useful for debugging, since you may be able to track down where a program went awry). If you want differing sequences of random numbers it is common to use a call to the system clock with a statement such as

`\$ date +%N443892000`

which returns the current time in nanoseconds (usually reported with accuracy on the order of microseconds, depending on the version of UNIX -- thanks to Dr. Conlon for helping me make sense out of the man file on date).

Putting it all together, we might do something like:

`\$ RANDOM=`date +%N|sed s/...\$//`\$ echo \$RANDOM6599\$ echo \$RANDOM686\$ echo \$RANDOM22505`

It appears (based on naive observation of its behavior, together with a bit of conjecture) that \$RANDOM will be in the interval 0 to 32,767. Hence you may have to do some arithmetic to adjust the size of the numbers you are dealing with:

`\$ echo "scale=9; \$RANDOM/32767"|bc.860866115`

Another approach would be to use awk:

```\$ echo|awk '{print rand()}'
0.237788```
Or, better yet
```echo|awk 'srand() {print rand()}'
```
And you may want to look at this:
`\$ echo -e "\n\n"|awk '{print rand()}'`
`0.2377880.2910660.845814`