[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Commands Reference, Volume 2

fformat Command


Formats a text paragraph.


fformatFile ] [ -df ] [ -dj ] [ -lNumber ] [ -rNumber ]


The fformat command fills or justifies paragraphs to the right margin, while preserving any left-margin indentation. The end of a paragraph is indicated by an empty line or a line beginning with a . (period).

You can use the fformat command as a filter with the Do function (the Alt-X key sequence), which runs the filter, or as a filter command from the system prompt. For information about keyboard layouts, press the F1 key (the Help function) within the INed editor.See "To Run Filter Commands" for more information on running filters from the editor

If you enter the fformat command with a file name from the system prompt, it reads the text from that file, justifies and fills each paragraph, and then writes the result to standard output.


-df Sets the format mode to fill, which is the default.
-dj Sets the format mode to justify.
-lNumber Sets the default left margin to the specified number (default 0). Since the input left margin is preserved, the value of the Number variable is used only where the left margin cannot be inferred. (For example, where an input paragraph consists of a single long line that must be split into two or more lines, the second and subsequent lines are indented by the specified number of characters.)
-rNumber Sets the right margin to the specified number. The maximum value for the Number variable is 130 and the default value is 65.

Using either the -df flag or the system default of 65 starts fill mode.


Using the following text as a sample paragraph:

People who are serious about collecting
sea shells often get up at the first light of dawn,
hoping to find the one
perfect shell.

entering fformat -dj -r34 results in:

   People  who  are  serious about
collecting sea shells often ge
t up
at the first light of dawn, ho
to find the  one perfect shell.

Related Information

The e command.

Editors Overview in AIX Version 4.3 INed Editor User's Guide introduces general concepts about editors and describes the main AIX editors.

Runnning AIX and Filter Commands from the INed Editor in AIX Version 4.3 INed Editor User's Guide provides more information about running a filter from the command.

[ Previous | Next | Contents | Glossary | Home | Search ]