Sponsored Links
-->

Sunday, December 24, 2017

Unix Fortune pour Android - YouTube
src: i.ytimg.com

fortune is a program that displays a pseudorandom message from a database of quotations that first appeared in Version 7 Unix. The most common version on modern systems is the BSD fortune, originally written by Ken Arnold. Distributions of fortune are usually bundled with a collection of themed files, containing sayings like those found on fortune cookies (hence the name), quotations from famous people, jokes, or poetry.

fortune is predominantly found on Unix-like systems, but clients for other platforms also exist. 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. It is also used to generate text input for certain XScreenSaver modes. Many people choose to pipe fortune into the cowsay command, to add more humor to the dialog.


Video Fortune (Unix)



Content

Most Unix systems use fortunes which 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 quotations from science fiction (Star Trek, The Cyberiad, Doctor Who, The Hitchhiker's Guide to the Galaxy, etc.), Zippy the Pinhead, 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 "offensive" dicta, which require the -a or -o options to be passed for viewing. These fortunes often include rude humor and profanity, personal attacks, and controversial comments about religion. Sometimes they are provided by another package, however as of FreeBSD 10.0 the offensive dicta have been removed completely. The exact fortunes vary between each type of Unix, however there seems to be a strong overlap between the FreeBSD and OpenBSD fortune files. The Plan 9 fortune files seem to be much shorter, with many just on 1 line, and the 'offensive' dicta is much stronger. Most Linux distributions, such as Ubuntu, choose the FreeBSD fortunes to put in their fortune packages, that can be installed through the package manager.


Maps Fortune (Unix)



Purpose

One of the included fortunes, from the "goedel" collection of fortunes about fortune itself, sums up the purpose of the program:

  Has anyone realized that the purpose of the fortune cookie program is to  defuse project tensions?  When did you ever see a cheerful cookie, a  non-cynical, or even an informative cookie?          Perhaps inadvertently, we have a channel for our aggressions.  This  still begs the question [sic] of whether the cookie releases the pressure or only  serves to blunt the warning signs.  
          Long live the revolution!          Have a nice day.  

The original fortune program could be used for the more general task of picking up a random line from a plain-text file. The example of such use is given in the rc documentation. However, in most modern Unix systems fortune cannot be used this way, since they use an ad hoc file format for fortune files to allow multiline aphorisms.


resume : Resumes Fortune Regarding 85 Wonderful Professional ...
src: ozov.biz


Fortune files

Conventional versions of fortune use two files for each quotation list: a text file with quotations, 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.


How to deploy Windows software on Sun Ray | ZDNet
src: www.winface.com


Common options

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


Remove Fortune Error in Terminal - Linux Mint - YouTube
src: i.ytimg.com


See also

  • cowsay
  • QOTD

irclog2html for #debian on 20061116
src: www.levenez.com


References


File:Fortune cookie broken 20040628 223252 1.jpg - Wikimedia Commons
src: upload.wikimedia.org


External links

  • An archive of fortunes files from various systems.
  • The manual page for the original Unix fortune(6) command.
  • A manual page for the fortune program under Linux
  • A simple online version of the Unix fortune program.
  • Continuous web 'slide show' of fortunes
  • A website that generates an RSS feed of random (but configurable) fortunes (especially for devices with simple RSS reader capabilities, e.g. VOIP phones)
  • A PHP framework for reading and displaying fortune files
  • Maintenance version of fortune-mod's source code - on GitHub with new releases
    • ftp://ftp.ibiblio.org/pub/linux/games/amusements/fortune/ - source code for fortune-mod program
  • A wiki containing all of the original non offensive fortunes
  • An ASCII web comic that provides a fortune.txt feed of its content
  • A simple fortune in PHP
  • An online fortune cookie site
  • On-line fortunes with numerous fortune files to choose from
  • A modern, color-terminal oriented fortune database
  • A fortune-mod add on for math-related fortunes

Source of article : Wikipedia