james@engrss2.unl.edu (James Nau) (05/23/91)
Does anyone know what (and why?) fortune changes in the /usr/games/lib/fortune/fortune.dat file? It changes only the first "line" (I think it's in the first 128 bytes). Is it writing a counter so that I don't see the same fortune twice? Thanks! James Nau james@engrs.unl.edu College of Engineering University of Nebraska--Lincoln W181 Nebraska Hall Lincoln, NE 68588-0501
jfh@rpp386.cactus.org (John F Haugh II) (05/23/91)
In article <1991May22.215452.7261@unlinfo.unl.edu> james@engrss2.unl.edu (James Nau) writes: >Does anyone know what (and why?) fortune changes in the >/usr/games/lib/fortune/fortune.dat file? It changes only the first >"line" (I think it's in the first 128 bytes). Is it writing a counter >so that I don't see the same fortune twice? Yes. The source code to the fortune program has been posted, and is available from BSD as well. You might want to acquire a copy and examine it. -- John F. Haugh II | Distribution to | UUCP: ...!cs.utexas.edu!rpp386!jfh Ma Bell: (512) 255-8251 | GEnie PROHIBITED :-) | Domain: jfh@rpp386.cactus.org "If liberals interpreted the 2nd Amendment the same way they interpret the rest of the Constitution, gun ownership would be mandatory."
markw@airgun.wg.waii.com (Mark Whetzel) (05/29/91)
In article <1991May22.215452.7261@unlinfo.unl.edu>, james@engrss2.unl.edu (James Nau) writes: > Does anyone know what (and why?) fortune changes in the > /usr/games/lib/fortune/fortune.dat file? It changes only the first > "line" (I think it's in the first 128 bytes). Is it writing a counter > so that I don't see the same fortune twice? > For that matter, where is the documentation on how to add to or build a private fortune database? The man command indicates that a user file can be specified, but there is no discription of how to build the beast. fortune Command Purpose Tells a random fortune. Syntax fortune [ -] [ -w | -s | -l | -a ] [File] Description The fortune command prints a fortune from either the fortunes.dat file or the file specified. After printing the fortune, the fortune command exits. And goes on to give discriptions of the flags. Info shows the same, no file layout. -- Mark Whetzel My comments are my own, not my company's. Western Geophysical - A division of Western Atlas International, A Litton/Dresser Company DOMAIN addr: markw@airgun.wg.waii.com VOICE: (713) 963-2446 UUNET address: uunet!airgun!markw