Previous Section  < Day Day Up >  Next Section

fmt—simple text formatters


fmt [ –c ] [ –s ] [ –w width | –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 –w width option. The default width is 72. fmt concatenates the input files listed as arguments. If none are given, fmt formats text from the standard input.

Example A.28.

fmt -c -w45 letter


EXPLANATION

Formats letter. The –c switch preserves the indentation of the first two lines within the paragraph and aligns the left margin of each subsequent line with that of the second line. The –w switch fills the output line of up to 45 columns.

    Previous Section  < Day Day Up >  Next Section