FMT(1plan9) | FMT(1plan9) |
fmt, htmlfmt - simple text formatters
fmt [ option ... ] [ file ... ]
htmlfmt [ -a ] [ -c charset ] [ -u url ] [ file ... ]
Fmt copies the given files (standard input by default) to its standard output, filling and indenting lines. The options are
Empty lines and initial white space in input lines are preserved. Empty lines are inserted between input files.
Fmt is idempotent: it leaves already formatted text unchanged.
Htmlfmt performs a similar service, but accepts as input text formatted with HTML tags. It accepts fmt's -l and -w flags and also:
/src/cmd/fmt.c
/src/cmd/htmlfmt
Htmlfmt makes no attempt to render the two-dimensional geometry of tables; it just treats the table entries as plain, to-be-formatted text.