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 (

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 Barry Byrne
jot -r 5 0 9 | rs -g 0 5 -- Barry Byrne, IT Manager, WBT Systems, Block 2, Harcourt Centre Harcourt Street, Dublin 2, Ireland > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of Jack L. Stone > Sent: 16 June 2003 17:15 > To: [EMAIL PROTECTED] > Subject: R

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 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