Команда fmt

Simple text formatters.

Синтаксис

fmt [-c] [-s] [-w width | -width ] [inputfile]

-cCrown margin mode. Preserve the indentation of the first two lines within a paragraph, and align the left margin of each subsequent line with that of the second line. This is useful for tagged paragraphs.
-sSplit lines only. Do not join short lines to form longer ones. This prevents sample lines of code, and other such formatted text, from being unduly combined.
-w width | -widthFill output lines to up to width columns.
inputfileThe input file.

Примеры

fmt myfile.txt - would display a formatted version of the file myfile.txt. To direct the results to another file (such as myfile2.txt) type:

fmt < myfile.txt > myfile2.txt

Обратно к списку команд