|
Quick links About
fmt Syntax Examples
Related commands Linux / Unix main page
About fmt
Simple text formatters.
Syntax
fmt [-c] [-s] [-w width | -width ] [inputfile]
| -c |
Crown 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. |
| -s |
Split 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 | -width |
Fill output lines to up to width columns. |
| inputfile |
The input file. |
Examples
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
Related commands
nroff
vi
|
|
| Resolved | Were you able to locate the answer to your questions? |
|
|