Microsoft Store
 

Fortune (program)


 

fortune is a simple program that displays a random message from a database of quotes. Most distributions of fortune are bundled with files of quotations from famous people, sayings like those found on fortune cookies (hence the name), and other humorous items. Fortune is predominately found on Unix-like systems, but clients for other platforms exist as well. Often, users on text-mode Unix terminals will place this command into either their .profile or .logout files to display them at logon and logout, respectively.

Related Topics:
Fortune cookie - Unix-like

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

Most Unix systems use a roughly equivalent set of fortunes. The fortunes dispensed are slanted heavily towards the user base of Unix, and thus contain many obscure jokes about computer science and computer programming. Other favoured sources include quotes from science fiction (Star Trek, The Cyberiad, Doctor Who, The Hitchhiker's Guide to the Galaxy, etc.), and the writings of Ambrose Bierce and Dave Barry. Most fortune collections also include a wide variety of more conventionally-sourced quotations, jokes, and other short passages. A few distributions include so-called "offensive" dicta, which require the "-a" or "-o" options to be passed for viewing (see the section "Common options" below).

Related Topics:
Computer science - Computer programming - Science fiction - Star Trek - The Cyberiad - Doctor Who - The Hitchhiker's Guide to the Galaxy - Ambrose Bierce - Dave Barry - The section "Common options"

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

Conventional versions of fortune use two files for each quote list: a text file with quotes, each separated by the character "%" on its own line, and a random-access data file generated by the "strfile" program. Alternative implementations, including those made for display on Web pages, typically use only the text file.

~ ~ ~ ~ ~ ~ ~ ~ ~ ~