random numbers in a C shell script?
Rob McMahon
cudcv at warwick.ac.uk
Mon May 8 19:44:14 AEST 1989
In article <3138 at uokmax.UUCP> randy at uokmax.UUCP (Longshot) writes:
>In article <1501 at cmx.npac.syr.edu> gefuchs at logiclab.cis.syr.edu (Gill E. Fuchs) writes:
>-how would one go about getting a random numba in a C shell script?
>
>No way that I could find. I wrote this tiny prg to allow me to do it:
4.3BSD comes with a really useful program called `jot' in the user contributed
software under `tools'.
jot -r 3 10 99
will give 3 random numbers between 10 and 99 inclusive
jot -c - a z 1
prints the alphabet. I use it all the time in e.g.
foreach i ( `jot -c - a z 1` )
Rob
--
UUCP: ...!mcvax!ukc!warwick!cudcv PHONE: +44 203 523037
JANET: cudcv at uk.ac.warwick ARPA: cudcv at warwick.ac.uk
Rob McMahon, Computing Services, Warwick University, Coventry CV4 7AL, England
More information about the Comp.unix.questions
mailing list