Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Having trouble creating custom fortunes for the fortune command. I am running Mac OS X 10.6 and I used fink to install the fortune and fortune-mod command. Here is my process:

  1. I create a text file like so:

    ARMED MEN ARE CITIZENS, UNARMED MEN
    ARE SUBJECTS!!! 
    %
    Armenians are
    comical in full battle dress. % Armies
    aren't known for neatness.  -- Solomon
    Short %
    
  2. Ran this command in the Terminal:

    strfile mytextfile quotes.dat
    
  3. Finally I try and run:

    fortune quotes.dat
    

    And greets me with this error:

    fortune:/Users/bigred/Downloads/quotes.dat not a fortune file or directory
    

Any ideas?

share|improve this question
up vote 2 down vote accepted

You run it from the text file, the .dat file is just the database. Both files need to be named the same and in the same directory. When you type fortune quotes it will look for quotes.dat.

so:

strfile quotes

will create quotes.dat. You can then run them like so:

fortune quotes

output:

[root@awesome ~]# fortune quotes
ARMED MEN ARE CITIZENS, UNARMED MEN ARE SUBJECTS!!!
share|improve this answer
    
Thanks man, that really helped! – bigredjoe Dec 10 '09 at 22:19
    
You're very welcome! :) – John T Dec 10 '09 at 22:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.