fmt - Formats mail messages prior to sending
fmt [-width] file...
The fmt command reads the input file or files, or standard input if no files are specified, and writes to standard output a version of the input with lines of a length as close as possible to width bytes.
The fmt command both joins and splits lines to achieve the desired width, but words are never joined or split; spaces are always preserved, and lines are split at spaces only. In effect, fmt ignores newline characters in the input and wraps words to make lines a close as possible to width bytes, resulting in individual lines of varying length but a consistent (new) text width overall. Because blank lines are always preserved, fmt does not merge paragraphs separated by blank lines.
If you specify more than one file, the files are concatenated as input to fmt. If you do not specify -width, the default line length is 72 bytes. Spacing at the beginning of input lines is always preserved in the output.
command is generally used to format mail
messages to improve their appearance before they are sent. It may also be
useful, however, for other simple formatting tasks. For example, when you
vi, you can use the command
to reformat your text so that all lines are approximately 60 bytes
command is a fast, simple formatting
program. Standard text editing programs are more appropriate than
for complex formatting operations.
Do not use the
command if the message
contains embedded messages or preformatted information from other files.
This command formats the heading information in embedded messages and may
change the format of preformatted information.
file1 contains these lines:
Commands: mail(1), mailx(1), vi(1)