fortune

fortune

Claudio Matsuoka (cmatsuoka) Publisher
  • Claudio Matsuoka (cmatsuoka) Publisher

Install latest/stable of fortune

Ubuntu 16.04 or later?

Make sure snap support is enabled in your Desktop store.


Install using the command line

sudo snap install fortune-cm

Don't have snapd? Get set up for snaps.

Channel Version Published

Display a random fortune

fortune is a command-line utility which displays a random quotation from a collection of quotes. This collection is read from the local file system and does not require network access.

This is a build of fortune-mod from from https://github.com/shlomif/fortune-mod. It includes both inoffensive and offensive fortune databases, but the latter will only be accessed when the -o parameter is specified.

Available parameters are:

  • -a: Choose from all lists of maxims, both offensive and not. (See the -o option for more information on offensive fortunes.)
  • -c: Show the cookie file from which the fortune came.
  • -e: Consider all fortune files to be of equal size (see discussion below on multiple files).
  • -f: Print out the list of files which would be searched, but don't print a fortune.
  • -l: Long dictums only. See -n on how "long" is defined in this sense.
  • -m pattern: Print out all fortunes which match the basic regular expression pattern.
  • -n length: Set the longest fortune length (in characters) considered to be "short" (the default is 160). All fortunes longer than this are considered "long".
  • -o: Choose only from potentially offensive aphorisms. The -o option is ignored if a fortune directory is specified.
  • -s: Short apothegms only. See -n on which fortunes are considered "short".
  • -i: Ignore case for -m patterns.
  • -w: Wait before termination for an amount of time calculated from the number of characters in the message.

The user may specify alternate sayings. You can specify a specific file, a directory which contains one or more files, or the special word all which says to use all the standard databases. Any of these may be preceded by a percentage, which is a number n between 0 and 100 inclusive, followed by a %. If it is, there will be a n percent probability that an adage will be picked from that file or directory. If the percentages do not sum to 100, and there are specifications without percentages, the remaining percent will apply to those files and/or directories, in which case the probability of selecting from one of them will be based on their relative sizes.

Snap packaging files: https://github.com/cmatsuoka/fortune-snap

Details for fortune

License
  • BSD-4-Clause

Last updated
  • 16 September 2021

Links

Share this snap

Generate an embeddable card to be shared on external websites.


Related blog posts


Where people are using fortune

Users by distribution (log)

Manjaro
Ubuntu 20.04
Ubuntu 22.04
CentOS 7
Ubuntu 18.04

Install fortune on your Linux distribution

Choose your Linux distribution to get detailed installation instructions. If yours is not shown, get more details on the installing snapd documentation.


Is there a problem with fortune? Report this app