home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


UNIX in a Nutshell: System V Edition

UNIX in a Nutshell: System V EditionSearch this book
Previous: Reference: fmli Chapter 2
UNIX Commands
Next: Reference: fmtmsg
 

fmt



fmt

 [

options

] [

files

]

Fill and join text, producing lines of roughly the same length. (Unlike nroff, the lines are not justified.) fmt ignores blank lines and lines beginning with a dot ( . ) or with "From:". The emacs editor uses ESC-q to join paragraphs, so fmt is useful for other editors, such as vi. The following vi command fills and joins the remainder of the current paragraph:



!}fmt

Options

-c

Don't adjust the first two lines; align subsequent lines with the second line. Useful for paragraphs that begin with a hanging tag.

-s

Split long lines but leave short lines alone. Useful for preserving partial lines of code.

-w n

Create lines no longer than n columns wide. Default is 72. (Can also be invoked as - n for compatibility with BSD.)

- width

Create lines no longer than width ; default is 72 columns.


Previous: Reference: fmli UNIX in a Nutshell: System V Edition Next: Reference: fmtmsg
Reference: fmli Book Index Reference: fmtmsg

The UNIX CD Bookshelf Navigation The UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System