Fun with unix: Fortune

The old ones are the best, so they say, and this is definitely the case with fortune. At the command line, type “fortune” and see what you get. Mine read

“Next Friday will not be your lucky day. As a matter of fact, you don’t
have a lucky day this year.”

This and other random nuggets of information, quotes or entire randomness will be output by this program. You can combine this with cowsay to great effect, for example:


fortune | cowsay

________________________________________ / Q: Why is Christmas just like a day at \ | the office? A: You do all of the work | | and the fat guy in the suit | \ gets all the credit. / ———————————————————— \ __ \ (oo)\_______ (__)\ )\/\ ||——w | || ||

Paste that line into your .bashrc or equivalent and ensure a little chuckle, or maybe complete bewilderment, every time you log in!

Leave a Reply

Please use [code] and [/code] around any source code you wish to share.

This site uses Akismet to reduce spam. Learn how your comment data is processed.