1fmt(1)                           User Commands                          fmt(1)
2
3
4

NAME

6       fmt - simple text formatters
7

SYNOPSIS

9       fmt [-cs] [-w width | -width] [inputfile]...
10
11

DESCRIPTION

13       fmt  is  a simple text formatter that fills and joins lines  to produce
14       output lines of (up to) the number of characters specified  in  the  -w
15       width option. The default  width is 72. fmt concatenates the inputfiles
16       listed as arguments. If none are given, fmt formats text from the stan‐
17       dard input.
18
19
20       Blank  lines  are  preserved  in  the output, as is the spacing between
21       words. fmt does not fill nor split lines beginning with  a  `.'  (dot),
22       for  compatibility  with  nroff(1).  Nor does it fill or split a set of
23       contiguous non-blank lines which is determined to be a mail header, the
24       first line of which must begin with "From".
25
26
27       Indentation  is preserved in the output, and input lines with differing
28       indentation are not joined (unless -c is used).
29
30
31       fmt can also be used as an in-line text filter for vi(1). The  vi  com‐
32       mand:
33
34
35       !}fmt
36
37
38       reformats the text between the cursor location and the end of the para‐
39       graph.
40

OPTIONS

42       -c                   Crown margin mode. Preserve the indentation of the
43                            first  two lines within a paragraph, and align the
44                            left margin of each subsequent line with  that  of
45                            the  second  line. This is useful for tagged para‐
46                            graphs.
47
48
49       -s                   Split lines only. Do not join short lines to  form
50                            longer  ones.  This prevents sample lines of code,
51                            and other such formatted text, from  being  unduly
52                            combined.
53
54
55       -w width | -width    Fill output lines to up to  width columns.
56
57

OPERANDS

59       inputfile    Input file.
60
61

ENVIRONMENT VARIABLES

63       See  environ(5)  for a description of the LC_CTYPE environment variable
64       that affects the execution of fmt.
65

ATTRIBUTES

67       See attributes(5) for descriptions of the following attributes:
68
69
70
71
72       ┌─────────────────────────────┬─────────────────────────────┐
73       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
74       ├─────────────────────────────┼─────────────────────────────┤
75       │Availability                 │SUNWcsu                      │
76       └─────────────────────────────┴─────────────────────────────┘
77

SEE ALSO

79       nroff(1), vi(1), attributes(5), environ(5)
80

NOTES

82       The -width option is acceptable for BSD compatibility, but  it  may  go
83       away in future releases.
84
85
86
87SunOS 5.11                        9 May 1997                            fmt(1)
Impressum