[Ilugc] One Day One GNU/Linux Command (FMT)

  • From: sbharathi@xxxxxxxxxxxxx (Bharathi Subramanian)
  • Date: Mon Jul 14 09:50:41 2008

"No Software Patents!" -- Allowing patents over software ideas will
seriously affect the creativity, productivity and freedom of all.
Link: http://www.nosoftwarepatents.com/

One Day One GNU/Linux Command
=============================

fmt -- Simple optimal text ForMatTer

Summary :

`fmt' reads from the specified file arguments or stdin, and writes 
to stdout(display).

Examples :

$ fmt myfile -- Format myfile and max line length is 75.

$ fmt f1 f2  -- Format f1 f2  and max line length is 75.

$ fmt -w 60 f1 f2 -- Same as above but max line length is 60.

$ fmt -s myfile -- Don't split the small line. Useful if your file 
                   contains some sample program codes.

$ fmt -u myfile -- Uniform spacing. One space between words. Two space 
                   between sentences.

$ fmt -p BB myfile -- Only lines beginning with BB will be formatted.

$ fmt -t myfile -- Paragraph indentation will be preserved.

Note: By default, blank lines, spaces between words, and indentation
are preserved in the output; successive input lines with different
indentation are not joined; tabs are expanded on input and introduced
on output.

Read : man fmt

HTH :)
--
Bharathi S

Other related posts:

  • » [Ilugc] One Day One GNU/Linux Command (FMT) - Bharathi Subramanian