fmt man page on BSDOS

Man page or keyword search:  
man Server   6284 pages
apropos Keyword Search (all sections)
Output format
BSDOS logo
[printable version]

FMT(1)			     BSD Reference Manual			FMT(1)

NAME
     fmt - simple text formatter

SYNOPSIS
     fmt [-d] [goal [maximum]] [name ...]

DESCRIPTION
     Fmt is a simple text formatter which reads the concatenation of input
     files (or standard input if none are given) and produces on standard out-
     put a version of its input with lines as close to the goal length as pos-
     sible without exceeding the maximum.  The goal length defaults to 65 and
     the maximum to 75.	 The spacing at the beginning of the input lines is
     preserved in the output, as are blank lines and interword spacing.

     Fmt is meant to format mail messages prior to sending, but may also be
     useful for other simple tasks.  For instance, within visual mode of the
     ex(1) editor (e.g.	 vi(1))	 the command

	   !}fmt

     will reformat a paragraph, evening the lines.

     Fmt supports one option:

     -d		 Don't break text at lines that begin with a dot (`.'). Fmt
		 normally preserves line breaks before and after input lines
		 that begin with a dot so that nroff(1) commands can be passed
		 through unchanged.

     Fmt looks for certain mail header lines in the input and preserves line
     breaks before and after them.  The rules are fairly restrictive.  Fmt
     will preserve a line break before and after a traditional Unix mail head-
     er line that begins with `From ' and contains a sender and a date.	 It is
     not necessary for this line to be preceded by a blank line in the input.
     If a line beginning with `To', `Subject' or `Cc' is found within 2 input
     lines after a `From ' line, fmt preserves line breaks before and after
     such lines.

     Fmt recognizes certain sentence-ending punctuation marks at the ends of
     input lines, and ensures that they will be padded by two spaces in run-
     ning output text instead of the usual one space.  The recognized marks
     are `.', `:', `!' and `?'.

     Fmt takes into account any overstriking or underlining with backspaces
     when calculating output line length.

     If consecutive input lines have a common indentation, fmt preserves that
     indentation in the output.	 If the indentation increases, or if it de-
     creases by more than 8 character positions, fmt breaks output lines.
     This allows fmt to fill most indented paragraphs correctly, and to fill
     consecutive indented input lines correctly as well.

SEE ALSO
     nroff(1),	mail(1)

HISTORY
     The fmt command appeared in 3BSD.

BUGS
     The program was designed to be simple and fast - for more complex opera-
     tions, the standard text processors are likely to be more appropriate.

     File names that look like numbers can be mistaken for the goal or maximum
     parameters.

     The mail header rules are arcane.

BSDI BSD/OS			 April 9, 1998				     2
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server BSDOS

List of man pages available for BSDOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net