FACTOID # 51: Russia won the first World Air Games, held in Turkey in 1997. Events included hang-gliding, sky-surfing, and ballooning.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

SEARCH ALL

FACTS & STATISTICS    Advanced view

Search encyclopedia, statistics and forums:

 

 

(* = Graphable)

 

 


Encyclopedia > Fortune (Unix)

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 predominantly 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. An open fortune cookie A fortune cookie Hot fortune cookies being folded around paper fortunes. ... A Unix-like operating system is one that behaves in a manner similar to a Unix system, while not necessarily conforming to or being certified to any version of the Single UNIX Specification. ...


Most Unix systems use a roughly equivalent set of fortunes. The fortunes dispensed are slanted heavily toward 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). Computer science, or computing science, is the study of the theoretical foundations of information and computation and their implementation and application in computer systems. ... Computer programming (often simply programming or coding) is the craft of writing a set of commands or instructions that can later be compiled and/or interpreted and then inherently transformed to an executable that an electronic machine can execute or run. Programming requires mainly logic, but has elements of science... Science fiction is a form of speculative fiction principally dealing with the impact of imagined science and technology, or both, upon society and persons as individuals. ... Star Trek is an American science-fiction franchise spanning six television series, ten feature films, hundreds of novels, computer and video games, and other fan stories. ... The Cyberiad is a series of short stories by Stanisław Lem. ... Doctor Who is a long-running British science fiction television programme produced by the BBC about a mysterious time-travelling adventurer known as The Doctor, who explores time and space with his companions, fighting evil. ... The cover of the first novel in the Hitchhikers series, from a late 1990s printing. ... Ambrose Gwinnett Bierce (June 24, 1842–1914?) was an American satirist, critic, social commentator, poet, short story writer, editor, and journalist. ... David Barry, Jr. ...


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(8) program. Alternative implementations, including those made for display on Web pages, typically use only the text file.


A fortune program first appeared in Version 7 Unix. The most common version on modern systems is the BSD fortune, originally written by Ken Arnold. Seventh Edition Unix, also called Version 7 Unix, Version 7 or just V7, was an important early release of the Unix operating system. ... Berkeley Software Distribution (BSD, sometimes called Berkeley Unix) is the Unix derivative distributed by the University of California, Berkeley, starting in the 1970s. ... Image:Http://www. ...


Common options

Several common options exist that change the way command-line versions of fortune behave:

Option Action
-a Choose from all databases, regardless of whether they are considered "offensive"
-e Make the probability of choosing a fortune file equal to that of all other files
-f Print out a list of all fortune files that would have been searched, but do not print a fortune
-i When used with -m, make regular expression searching case-insensitive
-l Use only quotes longer than the length specified with -n, or 160 characters if -n is not used
-m [pattern] Print all fortunes matching the regular expression specified in [pattern]
-n [length] Override the length used by -l and -s to determine "long" and "short" messages (default 160 characters)
-o Choose only from "offensive" databases
-s Use only quotes shorter than the length specified with -n, or 160 characters if -n is not used
-w Wait for a period of time before terminating; useful for situations in which a fortune needs to be read before the screen is cleared

External links



 
 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms, 1022, m