]> git.armaanb.net Git - bin.git/blob - man/fortune.1.scd
Write manpages
[bin.git] / man / fortune.1.scd
1 fortune(1)
2
3 # NAME
4 fortune - fortune implementation in POSIX awk/sh
5
6 # SYNOPSIS
7 *fortune*++
8 *fortune* [options]
9
10 # DESCRIPTION
11 This is a reimplementation of the classic fortune program in POSIX compliant
12 awk/sh. Why is this needed? The classic fortune program included in the BSDs
13 isn't portable, and fortune-mod has the craziest build system ever dreamt
14 of. This script does a good enough job for most fortune seekers.
15
16 The meat and potatoes of the script is some awk code, however it is wrapped in a
17 shell script to do argument parsing.
18
19 fortune looks for cookie files in $FORTUNEDIR, which defaults to
20 /usr/share/fortune. Cookie files are simple text files with each fortune
21 seperated by a "%" on a newline. Examples can be found at
22 <https://github.com/shlomif/fortune-mod>.
23
24 # OPTIONS
25 *-h*, *--help*
26         Show a help message
27
28 *-l*, *--list*
29         List installed cookie files
30
31 *-c*, *--cookie*
32         Specify a cookie file
33
34 *-n*, *--min* MINIMUM_LENGTH
35         Specify a minimum output length
36
37 *-N*, *--max* MAXIMUM_LENGTH
38         Specify a maximum output length
39
40 # EXIT CODES
41 *0*     Success++
42 *1*     Generic error++
43 *2*     Argument parsing error
44
45 # COPYRIGHT
46 This is free and unencumbered software released into the public domain. For more
47 information, please refer to <https://unlicense.org/>.