fortune data file and fortune command

fortune data file and fortune command

Post by James N » Fri, 24 May 1991 06:54:52



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


College of Engineering
University of Nebraska--Lincoln
W181 Nebraska Hall
Lincoln, NE  68588-0501

 
 
 

fortune data file and fortune command

Post by John F Haugh » Fri, 24 May 1991 22:20:58



>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

"If liberals interpreted the 2nd Amendment the same way they interpret the
 rest of the Constitution, gun ownership would be mandatory."

 
 
 

fortune data file and fortune command

Post by Mark Whetz » Fri, 31 May 1991 00:40:03



> 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,

VOICE: (713) 963-2446              UUNET address:  uunet!airgun!markw

 
 
 

1. Using the 'fortune' command with own data file

When I try using the fortune command with an ascii file, I get an endless
string of ascii 127 characters. I tried 'fortune myfile.dat' at the
command line. What am I doing wrong? Does the data file require a special
format or terminators after each quotation? The man page doesn't say.
Thanks for any help. Email appreciated.

-----------------------------------------------------------------------------

           http://grad.csee.usf.edu/Farhad/mulder/homepage.html
     Information Systems C/C++  --  University of South Florida, Lakeland
                  Nothing changes until something changes.
-----------------------------------------------------------------------------

2. X shared memory

3. fortune - how to make own fortunes ?

4. dd - short write

5. fortune-0.1 - simple, small, fast fortune program

6. Gateway with DVD player

7. Howto: create fortune data file?

8. NT won't auto-login to Samba?

9. fortune data files

10. fortune: command not found

11. Making fortune files

12. "fortune" database files

13. how to create fortune files?