4 fortune - fortune implementation in POSIX awk/sh
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.
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.
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>.
29 List installed cookie files
34 *-n*, *--min* MINIMUM_LENGTH
35 Specify a minimum output length
37 *-N*, *--max* MAXIMUM_LENGTH
38 Specify a maximum output length
43 *2* Argument parsing error
46 This is free and unencumbered software released into the public domain. For more
47 information, please refer to <https://unlicense.org/>.