MPE/iX Shell and Utilities Reference Manual, Vol 1

fmt(1) MPE/iX Shell and Utilities fmt(1)
NAME
fmt — simple text formatter
SYNOPSIS
fmt [–bCcjns][–l n][–p n][–w n][file ...]
DESCRIPTION
fmt is a simple text formatter intended for modest tasks such as formatting mail messages,
and for use within the Vi family of text editors. Formatted output is written to the standard
output. fmt reads input from the file arguments on the command line; when there are none of
these, it reads from the standard input.
In the output, white space at the beginning of a line consists of tab characters and blanks.
White space in the middle of a line is always spaces. (which means that fmt converts tabs to
spaces).
Normally, fmt ignores line breaks in input, filling output lines. For example,
Mary had a little lamb
Its fleece was white as snow
becomes
Mary had a little lamb Its fleece was white as snow
However, blank lines, changes in indent, and input lines starting with a . do cause a break. In
this way, nroff/troff files are preserved.
Options
fmt accepts the following options:
–b assumes block paragraphs (that is, paragraphs are uniformly indented including first
line), and breaks lines on every change of input indentation.
–C centers the input lines. fmt ignores the indentation of input lines.
–c assumes crown paragraphs (that is, paragraphs start with a line with a negative indent
(every line but the first is indented)) and therefore breaks on a decrease in indentation
only.
–j produces a justified right margin by inserting extra blanks into output lines as neces-
sary.
–l n sets the maximum line length to n characters. By default, fmt produces output lines
of at most 72 characters.
1-238 Commands and Utilities