[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Tips



> from a quick look, it seems that the format is pretty easy. There is a pair
> of files, the "source" where all fortunes are just separated by a % sign and
> a data file with the info for the files that is automatically created from the
> former by strfile(8). It seems to be pretty straightforward. (But this was just
> a quick look...)

This is exactly how it works.  I maintain a fortune file here at my
company of funny things that people have said during our meetings over
the
years.  Every day when people login, they get a random funny quote. 
Does
this ever bring back memories (good ones that is)  8)  The fortune
program
is great for this!

Just to be really clear, here's an example of how to use fortune:

bash$ cat > foobar
fortune 1
%
fortune 2
%
fortune 3
^D
bash$ /usr/sbin/strfile -rs foobar
bash$ fortune foobar
fortune 1
bash$ fortune foobar
fortune 3
bash$ fortune .
fortune 2
bash$

Note that you can give an explicit filename to fortune(1) or just give
a directory that contains several fortune files.  Alternatively you
can put the file in /usr/share/games/fortunes which is the default
place fortune(1) looks for fortune files.

I hope this helps.

Behan

-- 
Behan Webster     mailto:behanw@verisim.com
(613) 224-7547    http://www.verisim.com/


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-REQUEST@lists.debian.org . Trouble? e-mail to Bruce@Pixar.com


Reply to: