1DEMANDOC(1)               BSD General Commands Manual              DEMANDOC(1)
2

NAME

4     demandoc — emit only text of UNIX manuals
5

SYNOPSIS

7     demandoc [-w] [file ...]
8

DESCRIPTION

10     The demandoc utility emits only the text portions of well-formed mdoc(7)
11     and man(7) UNIX manual files.
12
13     By default, demandoc parses standard input and outputs only text nodes,
14     preserving line and column position.  Escape sequences are omitted from
15     the output.
16
17     Its arguments are as follows:
18
19     -w      Output a word list.  This outputs each word of text on its own
20             line.  A "word", in this case, refers to whitespace-delimited
21             terms beginning with at least two letters and not consisting of
22             any escape sequences.  Words have their leading and trailing
23             punctuation (double-quotes, sentence punctuation, etc.) stripped.
24
25     file ...
26             The input files.
27
28     If a document is not well-formed, it is skipped.
29
30     The -i, -k, -m, and -p flags are silently discarded for calling compati‐
31     bility with the historical deroff.
32

EXIT STATUS

34     The demandoc utility exits with one of the following values:
35
36     0       No errors occurred.
37     6       An operating system error occurred, for example memory exhaustion
38             or an error accessing input files.  Such errors cause demandoc to
39             exit at once, possibly in the middle of parsing or formatting a
40             file.  The output databases are corrupt and should be removed .
41

EXAMPLES

43     The traditional usage of demandoc is for spell-checking manuals on BSD.
44     This is accomplished as follows (assuming British spelling):
45
46           $ demandoc -w file.1 | spell -b
47

SEE ALSO

49     mandoc(1), man(7), mdoc(7)
50

HISTORY

52     demandoc replaces the historical deroff utility for handling modern
53     man(7) and mdoc(7) documents.
54

AUTHORS

56     The demandoc utility was written by Kristaps Dzonsons <kristaps@bsd.lv>.
57
58BSD                              June 20, 2019                             BSD
Impressum