Formats mail messages prior to sending.
/usr/bin/fmt [ -Width ] [ File ... ]
The fmt command starts a text formatter that reads the concatenation of input Files (or standard input if no Files are specified), then produces on standard output a version of the input with the line lengths set to the value of -Width. If no value is specified with the -Width flag, the default value of 72 characters is used. The spacing at the beginning of the input lines is preserved in the output, as are blank lines and spacing between words.
The fmt command is generally used to format mail messages to improve their appearance before they are sent. However, the fmt command may also be useful for simple formatting tasks. For example, within visual mode of a text editing program such as the vi editor, the command !}fmt formats a paragraph so that all lines are set to the value specified with the -Width flag. If no value is specified with the -Width flag, the default value of 72 characters is used. Standard text editing programs are more appropriate than fmt for complex formatting operations.
Note: Do not use the fmt 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.
File | Specifies the name of the file to be formatted. |
-Width | Specifies the line length. The default value for Width is 72 characters. |
~| fmtThe ~| is entered at the left margin of the message. After you issue the ~| fmt command, the message is formatted. The word (continue) is displayed to indicate that you can enter more information or send the message.
fmt file1In this example, the file file1 is formatted and displayed on your screen.
/usr/bin/fmt | Contains the fmt command. |
The mail command, nroff command, vi command.
Editor Overview in AIX Version 4.3 INed Editor User's Guide.
Mail Overview in AIX Version 4.3 System User's Guide: Communications and Networks.