Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!unmvax!gatech!rutgers!psuvax1!flee From: flee@shire.cs.psu.edu (Felix Lee) Newsgroups: comp.unix.wizards Subject: Re: Why does 'fortune' write on the fortunes.dat file? Message-ID: Date: 13 Apr 89 14:13:20 GMT References: <28776@ucbvax.BERKELEY.EDU> Sender: news@psuvax1.cs.psu.edu Distribution: na Organization: Penn State University Computer Science Lines: 7 In-reply-to: haynes@ucbarpa.Berkeley.EDU's message of 13 Apr 89 05:01:31 GMT "fortune" doesn't pick a random fortune to print. Strange but true! What it does is print the next fortune that fits your command-line options. The next fortune is determined by reading (and writing) a counter in the fortunes.dat header. The randomness is in the order of the string table. -- Felix Lee flee@shire.cs.psu.edu *!psuvax1!shire!flee