On Sat, 2003-08-09 at 10:41, Robert P. J. Day wrote:
>
> as part of a shell script, i'd like to generate a random
> number (preferably an integer), but i'd like to do it in a
> POSIX-compliant way.
>
> AFAICT, using the $RANDOM variable is not POSIX-compliant --
> that variable is not defined
as part of a shell script, i'd like to generate a random
number (preferably an integer), but i'd like to do it in a
POSIX-compliant way.
AFAICT, using the $RANDOM variable is not POSIX-compliant --
that variable is not defined in a strict POSIX shell.
any other suggestions? perhaps readin
On Sat, 2003-08-09 at 14:38, Robert P. J. Day wrote:
> On 9 Aug 2003, Bret Hughes wrote:
>
> > On Sat, 2003-08-09 at 10:41, Robert P. J. Day wrote:
> > >
> > > as part of a shell script, i'd like to generate a random
> > > number (preferably an integer), but i'd like to do it in a
> > > POSIX-c
On Sat, Aug 09, 2003 at 05:07:08PM -0500, Bret Hughes wrote:
> I was able to dd the /dev/urandom but was lost how to turn all those
> funky chars into a number.
You are on a binary computer, and /dev/urandom is spitting out binary
data--what could be more fundamentally a number than that?
If you
On Sun, 2003-08-10 at 10:52, Kent Borg wrote:
> On Sat, Aug 09, 2003 at 05:07:08PM -0500, Bret Hughes wrote:
> > I was able to dd the /dev/urandom but was lost how to turn all those
> > funky chars into a number.
>
> You are on a binary computer, and /dev/urandom is spitting out binary
> data--wha
On Sat, 2003-08-09 at 14:38, Robert P. J. Day wrote:
> On 9 Aug 2003, Bret Hughes wrote:
>
> > On Sat, 2003-08-09 at 10:41, Robert P. J. Day wrote:
> > >
> > > as part of a shell script, i'd like to generate a random
> > > number (preferably an integer), but i'd like to do it in a
> > > POSIX-c
On 9 Aug 2003, Bret Hughes wrote:
> On Sat, 2003-08-09 at 10:41, Robert P. J. Day wrote:
> >
> > as part of a shell script, i'd like to generate a random
> > number (preferably an integer), but i'd like to do it in a
> > POSIX-compliant way.
> >
> > AFAICT, using the $RANDOM variable is not