fmt - simple text formatter
fmt [ options ] [ file ... ]
reads the input files and left justifies space separated words into lines width
characters or less in length and
writes the lines to the standard output. The standard input is read if -
or no files are specified. Blank lines and
interword spacing are preserved in the output. Indentation is preserved, and lines with identical indentation are joined and
fmt is meant to format mail messages prior to sending, but may also be useful for other simple tasks. For example, in
vi(1) the command :!}fmt will justify the lines in the current paragraph.
- -c, --crown-margin
Preserve the indentation of the first two lines within a paragraph, and align the left
margin of each subsequent line with that of the second line.
- -o, --optget
Format concatenated optget(3) usage
- -s, --split-only
Split lines only; do not join short lines to form longer ones.
- -u, --uniform-spacing
One space between words, two after sentences.
- -w, --width=columns
Set the output line width to columns. The default value is 72.