adjust.1 (2010 09)

a
adjust(1) adjust(1)
adjust also has a rudimentary understanding of tagged paragraphs (such as this one) when filling. If
the second line of a paragraph is indented more than the first, and the first line has a word
beginning at the same indentation as the second line, the input column position of the tag word
or words (prior to the one matching the second line indentation) is preserved.
Tag words are passed through without change of column position, even if they extend beyond the right
margin. The rest of the line is filled or right justified from the position of the first nontag word.
When
-j is given, adjust uses an intelligent algorithm to insert spaces in output lines where they are
most needed, until the lines extend to the right margin. First, all one space word separators are exam-
ined. One space is added to each separator, starting with the one having the most letters between it and
the preceding and following separators, until the modified line reaches the right margin. If all one space
separators are increased to two spaces and more spaces must be inserted, the algorithm is repeated with
two space separators, and so on.
Output line indentation is held to one less than the right margin. If a single word is larger than the line
size (right margin minus indentation), that word appears on a line by itself, properly indented, and
extends beyond the right margin. However, if
-r
is used, such words are still right justified, if possible.
If the current locale defines class names
ekinsoku and bkinsoku (see iswctype (3C)), adjust formats
the text in accordance with the
ekinsoku/
bkinsoku character classification and margin settings (see
-r, -j, and -m
options).
EXTERNAL INFLUENCES
Environment Variables
LANG provides a default value for the internationalization variables that are unset or null. If
LANG is
unset or null, the default value of "C" (see lang(5)) is used. If any of the internationalization variables
contains an invalid setting,
adjust will behave as if all internationalization variables are set to "C". See
environ (5).
LC_ALL If set to a nonempty string value, overrides the values of all the other internationalization vari-
ables.
LC_CTYPE determines the interpretation of text as single and/or multi-byte characters, the classification
of characters as printable, and the characters matched by character class expressions in regular expres-
sions.
LC_MESSAGES determines the locale that should be used to affect the format and contents of diagnostic
messages written to standard error and informative messages written to standard output.
NLSPATH determines the location of message catalogs for the processing of LC_MESSAGES.
International Code Set Support
Single- and multi-byte character code sets are supported.
DIAGNOSTICS
adjust complains to standard error and later returns a nonzero value if any input file cannot be opened
(it skips the file). It does the same (but quits immediately) if the argument to -m or -t is out of range, or
if the program is improperly invoked.
Input lines longer than
BUFSIZ are silently split (before tab expansion) or truncated (afterwards). Lines
that are too wide to center begin in column 1 (no leading spaces).
EXAMPLES
This command is useful for filtering text while in vi(1). For example,
!}adjust
reformats the rest of the current paragraph (from the current line down), evening the lines.
The
vi command:
:map ˆX {!}adjust -jˆVˆM
(where ˆ denotes control characters) sets up a useful "finger macro". Typing ˆX (Ctrl-X) reformats the
entire current paragraph.
adjust -m1 is a simple way to break text into separate words without whitespace, except for tagged-
paragraph tags.
2 Hewlett-Packard Company 2 HP-UX 11i Version 3: September 2010