'\" te .\" Copyright 1989 AT&T Copyright (c) 1997, Sun Microsystems, Inc. All Rights Reserved .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] .TH FMT 1 "May 9, 1997" .SH NAME fmt \- simple text formatters .SH SYNOPSIS .LP .nf \fBfmt\fR [\fB-cs\fR] [\fB-w\fR \fIwidth\fR | \fB-width\fR] [\fIinputfile\fR]... .fi .SH DESCRIPTION .sp .LP \fBfmt\fR is a simple text formatter that fills and joins lines to produce output lines of (up to) the number of characters specified in the \fB-w\fR\fI width\fR option. The default \fIwidth\fR is \fB72\fR. \fBfmt\fR concatenates the \fIinputfile\fRs listed as arguments. If none are given, \fBfmt\fR formats text from the standard input. .sp .LP Blank lines are preserved in the output, as is the spacing between words. \fBfmt\fR does not fill nor split lines beginning with a `\fB\&.\fR' (dot), for compatibility with \fBnroff\fR(1). Nor does it fill or split a set of contiguous non-blank lines which is determined to be a mail header, the first line of which must begin with "\fBFrom\fR". .sp .LP Indentation is preserved in the output, and input lines with differing indentation are not joined (unless \fB-c\fR is used). .sp .LP \fBfmt\fR can also be used as an in-line text filter for \fBvi\fR(1). The \fBvi\fR command: .sp .LP \fB!}fmt\fR .sp .LP reformats the text between the cursor location and the end of the paragraph. .SH OPTIONS .sp .ne 2 .na \fB\fB-c\fR\fR .ad .RS 21n Crown margin mode. Preserve the indentation of the first two lines within a paragraph, and align the left margin of each subsequent line with that of the second line. This is useful for tagged paragraphs. .RE .sp .ne 2 .na \fB\fB-s\fR\fR .ad .RS 21n Split lines only. Do not join short lines to form longer ones. This prevents sample lines of code, and other such formatted text, from being unduly combined. .RE .sp .ne 2 .na \fB\fB-w\fR\fI width\fR | \fB-\fR\fIwidth\fR\fR .ad .RS 21n Fill output lines to up to \fIwidth\fR columns. .RE .SH OPERANDS .sp .ne 2 .na \fB\fIinputfile\fR\fR .ad .RS 13n Input file. .RE .SH ENVIRONMENT VARIABLES .sp .LP See \fBenviron\fR(5) for a description of the \fBLC_CTYPE\fR environment variable that affects the execution of \fBfmt\fR. .SH SEE ALSO .sp .LP \fBnroff\fR(1), \fBvi\fR(1), \fBattributes\fR(5), \fBenviron\fR(5) .SH NOTES .sp .LP The \fB-\fR\fIwidth\fR option is acceptable for \fBBSD\fR compatibility, but it may go away in future releases.