|-c||Center the text, line by line. In this case, most of the other options are ignored; no splitting or joining of lines is done.|
|-m||Try to format mail header lines contained in the input sensibly.|
|-n||Format lines beginning with a . (dot) character. Normally, fmt does not fill these lines, for compatibility with nroff(1).|
|-p||Allow indented paragraphs. Without the -p flag, any change in the amount of whitespace at the start of a line results in a new paragraph being begun.|
|-s||Collapse whitespace inside lines, so that multiple whitespace characters are turned into a single space. (Or, at the end of a sentence, a double space.)|
|Treat the chars (and no others) as sentence-ending characters. By default the sentence-ending characters are full stop (.), question mark (?) and exclamation mark (!). Remember that some characters may need to be escaped to protect them from your shell.|
|Replace multiple spaces with tabs at the start of each output line, if possible. Each number spaces will be replaced with one tab. The default is 8. If number is 0, spaces are preserved.|
|Assume that the input files tabs assume number spaces per tab stop. The default is 8.|
will reformat a paragraph, evening the lines.
The LANG, LC_ALL and LC_CTYPE environment variables affect the execution of fmt as described in environ(7).
The fmt command appeared in BSD 3 .
The version described herein is a complete rewrite and appeared in
.Fx 4.4 .
.An Kurt Shoens
.An Liz Allen (added goal length concept)
.An Gareth McCaughan
The program was designed to be simple and fast - for more complex operations, the standard text processors are likely to be more appropriate.
When the first line of an indented paragraph is very long (more than about twice the goal length), the indentation in the output can be wrong.
The fmt utility is not infallible in guessing what lines are mail headers and what lines are not.