Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!mit-eddie!bu-cs!buengc!bph From: bph@buengc.BU.EDU (Blair P. Houghton) Newsgroups: comp.unix.questions Subject: Re: How do I pick a word at random from a list of words? Message-ID: <2923@buengc.BU.EDU> Date: 19 May 89 19:57:33 GMT References: <19669@adm.BRL.MIL> Reply-To: bph@buengc.bu.edu (Blair P. Houghton) Followup-To: comp.unix.questions Organization: Boston Univ. Col. of Eng. Lines: 15 In article <19669@adm.BRL.MIL> bjornand@idt.unit.no (Bjoern Andersen) writes: > >I need to pick a word from a list in a random sequence. How do I >achieve that in a csh or sh script? > >-- Bjoern. In the Unix archives at j.cc.purdue.edu, ( anonymous ftp to it, use 128.210.9.2 if necessary...) in the comp.unix.sources/volume2 directory, is a PD program called 'choose'. Snarf it, compile it, and try it. It selects random lines from a file, but the least you can do is rearrange its innards to select random words from a whitespace-separated set of words... --Blair