Fmt

From LQWiki
Jump to: navigation, search

fmt is a command that reflows text to make more uniform margins.

Options

  • -s --split-only splits long lines, but does not fill in short ones.
  • -w --width=WIDTH maximum line width
  • -g --goal=WIDTH goal width (default: 93% of width)

There are other options listed on the man page, but the actual effect is unclear.

Provided by

Most (all?) Linux distributions incorporate this from the GNU Coreutils: and use its man page

BUGS

  • Correct operation depends on input with sentences ending with newline or two spaces after the [.?!] terminator.
  • A quick trial showed output that seemed to disagree with the man-page description of some of the options used. Those options are not listed here.
  • The final line of a paragraph can be much longer than the goal if the width allows it.

See also

This article is a stub and needs to be finished. Plunge forward and help it grow!