icon Top 9 categories map      RocketAware >

fmt(1)

Tips: Browse or Search all pages for efficient awareness of more than 6000 of the most popular reusable and open source applications, functions, libraries, and FAQs.


The "RKT couplings" below include links to source code, updates, additional information, advice, FAQs, and overviews.


Home

Search all pages


Subjects

By activity
Professions, Sciences, Humanities, Business, ...

User Interface
Text-based, GUI, Audio, Video, Keyboards, Mouse, Images,...

Text Strings
Conversions, tests, processing, manipulation,...

Math
Integer, Floating point, Matrix, Statistics, Boolean, ...

Processing
Algorithms, Memory, Process control, Debugging, ...

Stored Data
Data storage, Integrity, Encryption, Compression, ...

Communications
Networks, protocols, Interprocess, Remote, Client Server, ...

Hard World
Timing, Calendar and Clock, Audio, Video, Printer, Controls...

File System
Management, Filtering, File & Directory access, Viewers, ...

    

RocketLink!--> Man page versions: OpenBSD FreeBSD NetBSD RedHat Solaris Others



FMT(1)                     OpenBSD Reference Manual                     FMT(1)

NAME
     fmt - simple text formatter



SYNOPSIS
     fmt [-cmps] [-d chars] [-l num] [-t num] [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 10 more than the goal length.  The spacing at the begin-
     ning of the input lines is preserved in the output, as are blank lines
     and interword spacing.

     The following options are available:

     -c      Center the text, line by line. In this case, most of the other
             options are ignored; no splitting or joining of lines is done.

     -m      Try to format mail header lines contained in the input sensibly.

     -p      Allow indented paragraphs. Without the -p flag, any change in the
             amount of whitespace at the start of a line results in a new
             paragraph being begun.

     -s      Collapse whitespace inside lines, so that multiple whitespace
             characters are turned into a single space. (Or, at the end of a
             sentence, a double space.)

     -d chars
             Treat the chars (and no others) as sentence-ending characters. By
             default the sentence-ending characters are full stop, question
             mark and exclamation mark. Remember that some characters may need
             to be escaped to protect them from your shell.

     -l number
             Replace multiple spaces with tabs at the start of each output
             line, if possible.  number spaces will be replaced with one tab.

     -t number
             Assume that the input files' tabs assume number spaces per tab
             stop. The default is 8.

     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.

SEE ALSO
     mail(1),  nroff(1)

HISTORY
     An fmt command appeared in 3BSD.

     The version described herein is a complete rewrite and appeared in OpenB-
     SD 2.4.

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.

     When the first line of an indented paragraph is very long (more than
     about twice the goal length), the indentation in the output can be wrong.

     fmt is not infallible in guessing what lines are mail headers and what
     lines are not.

OpenBSD 2.6                      June 6, 1993                                2

Source: OpenBSD 2.6 man pages. Copyright: Portions are copyrighted by BERKELEY
SOFTWARE DESIGN, INC., The Regents of the University of California, Massachusetts
Institute of Technology, Free Software Foundation, FreeBSD Inc., and others.



(Corrections, notes, and links courtesy of RocketAware.com)


[Detailed Topics]
FreeBSD Sources for fmt(1)
OpenBSD sources for fmt(1)


[Overview Topics]

Up to: Text File Output - Methods of printing and displaying text files.
Up to: File Viewers - Viewing the contents of files in various forms.


RocketLink!--> Man page versions: OpenBSD FreeBSD NetBSD RedHat Solaris Others






Rapid-Links: Search | About | Comments | Submit Path: RocketAware > fmt.1/
RocketAware.com is a service of Mib Software
Copyright 1999, Forrest J. Cavalier III. All Rights Reserved.
We welcome submissions and comments