fmt_mail [ -cs ] [ -width ] [ inputfile ... ]
fmt is a simple text formatter that fills and joins lines to produce output lines of (up to) the number of characters specified in the -width option. The default width is 72. fmt concatenates the inputfiles listed as arguments. If none are given, fmt formats text from the standard input.
Blank lines are preserved in the output, as is the spacing between words. fmt does not fill lines beginning with `.', for compatibility with nroff.1 Nor does it fill lines starting with `From:' (but for full compatibility with mail.1 use fmt_mail).
Indentation is preserved in the output, and input lines with differing indentation are not joined (unless -c is used).
fmt can also be used as an in-line text filter for vi.1 the vi command:
!}fmt
reformats the text between the cursor location and the end of the paragraph.
fmt_mail is a script that formats and sends mail messages. It leaves mail header lines untouched, and runs the remainder of the message through fmt -s. The resulting message is passed along to sendmail.8 which routes it to the recipient.
The environment variables LC_CTYPE, LANG, and LC_default control the character classification throughout fmt. On entry to fmt, these environment variables are checked in the following order: LC_CTYPE, LANG, and LC_default. When a valid value is found, remaining environment variables for character classification are ignored. For example, a new setting for LANG does not override the current valid character classification rules of LC_CTYPE. When none of the values is valid, the shell character classification defaults to the POSIX.1 ``C'' locale.
Created by unroff & hp-tools. © somebody (See intro for details). All Rights Reserved. Last modified 11/5/97