Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!unmvax!pprg.unm.edu!hc!lll-winken!uunet!mcvax!ukc!warwick!cudcv From: cudcv@warwick.ac.uk (Rob McMahon) Newsgroups: comp.unix.questions Subject: Re: random numbers in a C shell script? Message-ID: <153@titania.warwick.ac.uk> Date: 8 May 89 09:44:14 GMT References: <1501@cmx.npac.syr.edu> <3138@uokmax.UUCP> Reply-To: cudcv@warwick.ac.uk (Rob McMahon) Organization: Computing Services, Warwick University, UK Lines: 24 In article <3138@uokmax.UUCP> randy@uokmax.UUCP (Longshot) writes: >In article <1501@cmx.npac.syr.edu> gefuchs@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@uk.ac.warwick ARPA: cudcv@warwick.ac.uk Rob McMahon, Computing Services, Warwick University, Coventry CV4 7AL, England