HP-UX Reference (11i v2 04/09) - 1 User Commands N-Z (vol 2)
n
nljust(1) nljust(1)
must be given.
-r margin Designate a number as the print margin. The print margin is the column where trun-
cation or folding takes place. The print margin determines how many characters
appear on a single line and can never exceed the print width. The print margin is rela-
tive to the justification. If the print margin is 80, folding or truncation occurs at
column 80 starting from the right during a right justification. Similarly, folding or
truncation occurs at column 80 starting from the left during a left justification. By
default, the print margin is set to column 80.
-w width Designates a number as the print width. The print width is the maximum number of
columns in the print line. Print width determines the start of text during a right
justification. The larger the print width, the further to the right the text will start. By
default, an 80-column print width is used.
EXTERNAL INFLUENCES
Environment Variables
The
LANGOPTS environment variable determines the mode and order of the file. The syntax of
LAN-
GOPTS is [ mode ][_order ]. mode describes the mode of a file where
l represents Latin mode and n
represents non-Latin mode. Non-Latin mode is assumed for values other than
l and n. order describes
the data order of a file where
k is keyboard and s is screen. Keyboard order is assumed for values other
than
k and s. Mode and order information in LANGOPTS can be overridden from the command line.
The
LC_ALL environment variable determines the direction of a language (left-to-right or right-to-left)
and whether context analysis of characters is necessary.
The
LC_NUMERIC environment variable determines whether a language has alternative numbers.
The
LANG environment variable determines the language in which messages are displayed.
International Code Set Support
Single-byte character code sets are supported.
EXAMPLES
Right justify
file1 on a 132-column printer with a print margin at column 80 (the default):
nljust -w 132 file1 | lp
Right justify pr output of file2 with line numbers on a 132-column printer with a print margin at
column 132:
pr -n file2 | nljust -w 132 -r 132 | lp
WARNINGS
If pr with line numbers (-n option) is piped to nljust, the separator character must be a tab (0x09).
It is the user’s responsibility to ensure that the
LANGOPTS environment variable accurately reflects the
status of the file.
Mode and justification must be consistent. Only non-Latin-mode files can be right justified in a meaning-
ful way. Similarly, only Latin-mode files can be safely left justified. If mode and justification do not
match, the results are undefined.
If present, alternative numbers always have a left-to-right orientation.
The
nljust command is HP proprietary, not portable to other vendors’ systems, and will not be pro-
vided in future HP-UX releases.
AUTHOR
nljust was developed by HP.
SEE ALSO
forder(1), lp(1), pr(1), strord(3C).
HP-UX 11i Version 2: September 2004 − 2 − Hewlett-Packard Company Section 1−−675