O'Reilly logo

A Practical Guide to Red Hat® Linux® 8 by Mark G. Sobell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

fmt

Formats text very simply

fmt [option] [file-list]

The fmt utility does simple text formatting by attempting to make all nonblank lines nearly the same length.

Arguments

The fmt utility reads all the files in file-list and prints a formatted version of their contents to standard output. If you do not give any filenames, fmt reads standard input.

Options

--uniform-spacing

-u Changes the output so that one SPACE is between words; and two SPACEs are between sentences.

--width=n

-n Changes the output line width to n characters. Without this option, fmt tries to keep output lines close to 75 characters wide.

Notes

The fmt utility works by moving NEWLINE characters. The indentation of lines, as well as the spacing between words, is left intact. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required