Matt Schalit wrote: > > I'm trying to generate a random number between 10,000 and 60,000. > I've figured that with Oxygen and Dachstein I can gather random > bytes using dd: > > dd if=/dev/random of=/tmp/rbytes bs=1 count=1 > > So the file /tmp/rbytes has a string of 4 random characters.
I tried this, and I got one byte (bs=1 count=1). > Um, how do I covert those from ascii to integer? I tried printf. Only thing I could find was od - and that's not in any standard LEAF I know of. Might be among the Oxygen developer packages or in the package list, but it seems likely to be overkill for what you want. Turns out bash has the RANDOM variable which does what you want - but my version of ash (on my workstation) doesn't have it. Then I found the "openssl rand" command. Sigh - random numbers everywhere except anywhere helpful :-( _______________________________________________ Leaf-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/leaf-devel
