Text Processing

fmt

Reformats paragraphs of text.

fmt wraps text to a target width while preserving paragraphs.

Syntax
fmt [options] [file]

Arguments explained

  • -w sets output width.
  • -u uses uniform spacing.

Common examples

Wrap to 72 columns
fmt -w 72 notes.txt

Prints reflowed text.

Format clipboard text saved in a file
fmt draft.txt > draft-wrapped.txt

Writes wrapped output to a new file.

fmt Command
FieldDetails
Commandfmt
CategoryText Processing
Primary useReformats paragraphs of text.
Syntaxfmt [options] [file]