Linux "fmt" Command Line Options and Examples
simple optimal text formatter

Reformat each paragraph in the FILE(s), writing to standard output. The option -WIDTH is an abbreviated form of --width=DIGITS. With no FILE, or when FILE is -, read standard input.


Usage:

fmt [-WIDTH] [OPTION]... [FILE]...




Command Line Options:

-c
preserve indentation of first two lines
fmt -c ...
-p
reformat only lines beginning with STRING, reattaching the prefix to reformatted lines
fmt -p ...
-s
split long lines, but do not refill
fmt -s ...
-t
indentation of first line different from second
fmt -t ...
-u
one space between words, two after sentences
fmt -u ...
-w
maximum line width (default of 75 columns)
fmt -w ...
-g
goal width (default of 93% of width)
fmt -g ...
--help
display this help and exit
fmt --help ...
--version
output version information and exitAUTHORWritten by Ross Paterson.REPORTING BUGSGNU coreutils online help: <http://www.gnu.org/software/coreutils/>Report fmt translation bugs to <http://translationproject.org/team/>COPYRIGHTCopyright © 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
fmt --version ...