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. ...

Get A Practical Guide to Red Hat® Linux® 8 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.