Running a rand or random script

2003-06-16 Thread Jack L. Stone
I need to run a script, perhaps using FBSD's 'rand' or 'random' command (or any other) that will generate one single 5-digit number 'at random' between 1-9 Anyone have thoughts on how to do this?? Many thanks for any suggestions. Best regards, Jack L. Stone, Administrator SageOne Ne

Re: Running a rand or random script

2003-06-16 Thread Matthew Seaman
On Mon, Jun 16, 2003 at 11:15:17AM -0500, Jack L. Stone wrote: > I need to run a script, perhaps using FBSD's 'rand' or 'random' command (or > any other) that will generate one single 5-digit number 'at random' between > 1-9 > > Anyone have thoughts on how to do this?? perl -e 'pr

Re: Running a rand or random script

2003-06-16 Thread Simon Barner
Hi, > I need to run a script, perhaps using FBSD's 'rand' or 'random' command (or > any other) that will generate one single 5-digit number 'at random' between > 1-9 > > Anyone have thoughts on how to do this?? Don't know about a shell way to do this, but what about this tiny C progr

RE: Running a rand or random script

2003-06-16 Thread Barry Byrne
CTED] > Subject: Running a rand or random script > > > I need to run a script, perhaps using FBSD's 'rand' or 'random' > command (or > any other) that will generate one single 5-digit number 'at > random' between > 1-9 > > A

Re: Running a rand or random script

2003-06-16 Thread Jack L. Stone
At 05:32 PM 6.16.2003 +0100, Matthew Seaman wrote: >On Mon, Jun 16, 2003 at 11:15:17AM -0500, Jack L. Stone wrote: >> I need to run a script, perhaps using FBSD's 'rand' or 'random' command (or >> any other) that will generate one single 5-digit number 'at random' between >> 1-9 >> >> Anyo

Re: Running a rand or random script

2003-06-16 Thread Simon Barner
Whoops, did too much C++ programming these days, in C this should really be: #include #include int main (int argc, char *argv[]) { unsigned int r; srandomdev(); /* use this on non-BSD systems: srandom(time (0)); */ r = random (