LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-23-2004, 10:19 AM   #1
ddpicard
Member
 
Registered: Oct 2001
Location: Texas
Distribution: Slackware 13
Posts: 214

Rep: Reputation: 31
How to Create Fortune Database


I have been googling around for a while but I can't seem to find my answer. I want to create my own fortune files. By googling I have found a lot of fortune files to add but nothing on how they create them.

I know there are always 2 files. One is a .DAT file and the other is the text. Does anyone know how to create these or where I might find the instructions to creat them?

Thanks,
Dave
 
Old 08-25-2004, 08:48 PM   #2
ddpicard
Member
 
Registered: Oct 2001
Location: Texas
Distribution: Slackware 13
Posts: 214

Original Poster
Rep: Reputation: 31
Well, it's been a couple of days. I still can't find my answer. Anyone else have any ideas?

Dave
 
Old 08-25-2004, 09:05 PM   #3
ddpicard
Member
 
Registered: Oct 2001
Location: Texas
Distribution: Slackware 13
Posts: 214

Original Poster
Rep: Reputation: 31
Ok, once again google comes through for me. This was a touch one to find though. In case someone else is interested here is how you create your own Fortune Database:

create a file with quotes separated by %

%
silly quote 1
%
silly quote 2
%

call it sillyqoutes - and copy it to your fortunes directory (say
/usr/share/games/fortunes/) or wherever your fortunes are

Then run

# strfile sillyquotes

Then all you have to do is run fortune sillyquotes

Works great. Very easy to make.

Hope this helps somebody else,
Dave
 
1 members found this post helpful.
Old 09-16-2004, 01:48 PM   #4
mmcnees
LQ Newbie
 
Registered: Sep 2004
Location: Utah
Distribution: SuSE 9.1
Posts: 1

Rep: Reputation: 0
This was a big help for me. I just googled for it and found your post right off. Thanks for the info!

- Mike
 
Old 01-07-2009, 01:35 PM   #5
buzzbomb
LQ Newbie
 
Registered: Jan 2009
Posts: 1

Rep: Reputation: 0
Thanks

Thanks. It worked for me too. But I had to specify the path to the sillyquotes file I created.

Buzz

Last edited by buzzbomb; 01-07-2009 at 01:36 PM. Reason: add more shtuff
 
Old 08-03-2010, 04:41 AM   #6
x111
Member
 
Registered: Jul 2010
Distribution: Slackware
Posts: 49

Rep: Reputation: 7
Quote:
Originally Posted by buzzbomb View Post
Thanks. It worked for me too. But I had to specify the path to the sillyquotes file I created.

Buzz
No you don't have to do so. Just move the files to /usr/share/games/fortune. This is where fortune stores its database files. fortune will randomly select one of those files to pick a quote.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
create table in postgres database kranti Linux - Newbie 1 11-15-2005 06:52 PM
How to create Database in mysql irfanhab Linux - General 1 12-16-2004 06:37 PM
fortune database of quotes?(and a question for the moderators too) rmanocha Linux - Software 1 01-24-2004 06:16 PM
How to create a SQL Database in Linux? Phonics3k Programming 4 08-16-2003 03:31 AM
query DNS and create mysql database nabil Programming 0 01-18-2002 04:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration