*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->HP-UX 11i man pages -> nljust (1)              
Title
Content
Arch
Section
 

Contents


 nljust(1)                                                         nljust(1)




 NAME    [Toc]    [Back]
      nljust - justify lines, left or right, for printing

 SYNOPSIS    [Toc]    [Back]
      nljust [-acilnt] [-d digits] [-e seq] [-j just] [-m mode] [-o order]
      [-r margin] [-w width] [-x ck] [file ...]

 DESCRIPTION    [Toc]    [Back]
      nljust formats for printing data written in languages with a rightto-left
 orientation.  It is designed to be used with the pr and the lp
      commands (see pr(1) and lp(1)).

      nljust reads the concatenation of input files (or standard input if
      none are given) and produces on standard output a right-to-left
      formatted version of its input.  If - appears as an input file name,
      nljust reads standard input at that point.  Use -- to delimit the end
      of options.

      nljust formats input files for all languages that are read from right
      to left.  For languages that have a left-to-right orientation, the
      command merely copies input files to standard output.

    Options    [Toc]    [Back]
      nljust recognizes the following options:

           -a          Justify data for all languages, including those
                       having a left-to-right text orientation.  By default
                       only right-to-left language data is justified.  For
                       all other languages, input files are directly copied
                       to standard output.

           -c          Select enhanced printer shapes for some Arabic
                       characters.  With this option, two-character
                       combinations of laam and alif are replaced by a
                       single character.

           -i          Triggers ISO 8859-6 interpretation of the data.

           -d digits   Processes digits for output as hindi, western, or
                       both.  digits can be h, w, or both.

           -e seq      Use seq as the escape sequence to select the primary
                       character set.  This escape sequence is used by
                       languages that have too many characters to be
                       accommodated by ASCII in a single 256-character set.
                       In these cases, the seq escape sequence can be used
                       to select the non-ASCII character set.  The escape
                       character itself (0x1b) is not given on the command
                       line.  Hewlett-Packard escape sequences are used by
                       default.




 Hewlett-Packard Company            - 1 -   HP-UX 11i Version 2: August 2003






 nljust(1)                                                         nljust(1)




           -j just     If just is l, left justify print lines.  If just is
                       r, right-justify print lines starting from the
                       (designated or default) print width column.  The
                       default is right justification.

           -l          Replace leading spaces with alternative spaces.  Some
                       right-to-left character sets have a non-ASCII or
                       alternative space.  This option can be useful when
                       filtering pr -n output (see pr(1)).  With right
                       justification, the -l option causes line numbers to
                       be placed immediately to the right of the tab
                       character.  Without the -l option, right
                       justification causes line numbers to be placed at the
                       print-width column.  By default, leading spaces are
                       not replaced by alternative spaces.

           -m mode     Indicate mode of any file to be formatted.  Mode
                       refers to the text orientation of the file when it
                       was created.  If mode is l, assume Latin mode.  If
                       mode is n, assume non-Latin mode.  By default, mode
                       information is obtained from the LANGOPTS environment
                       variable.

           -n          Do not terminate lines containing printable
                       characters with a new-line.  By default, print lines
                       are terminated by new-lines.

           -o order    Indicate data order of any file to be formatted.  The
                       text orientation of a file can affect the way its
                       data is arranged.  If order is k, assume keyboard
                       order.  If order is s, assume screen order.  By
                       default, order information is obtained from the
                       LANGOPTS environment variable.

           -t          Truncate print lines that do not fit the designated
                       or default line length.  Print lines are folded (that
                       is, wrapped to next line) by default.

           -x ck       Expand input tabs to column positions k+1, 2*k+1,
                       3*k+1, etc.  Tab characters in the input are expanded
                       to the appropriate number of spaces.  If k is 0 or is
                       omitted, default tab settings at every eighth
                       position is assumed.  If cd (any non-digit character)
                       is given, it is treated as the input tab character.
                       The default for c is the tab character.  nljust
                       always expands input tabs.  This option provides a
                       way to change the tab character and setting.  If this
                       option is specified, at least one of the parameters c
                       or k must be given.





 Hewlett-Packard Company            - 2 -   HP-UX 11i Version 2: August 2003






 nljust(1)                                                         nljust(1)




           -r margin   Designate a number as the print margin.  The print
                       margin is the column where truncation 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 relative
                       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    [Toc]    [Back]
    Environment Variables
      The LANGOPTS environment variable determines the mode and order of the
      file.  The syntax of LANGOPTS is [mode][_order].  mode describes the
      mode of a file where l represents Latin mode and n represents nonLatin
 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    [Toc]    [Back]
      Single-byte character code sets are supported.

 EXAMPLES    [Toc]    [Back]
      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:



 Hewlett-Packard Company            - 3 -   HP-UX 11i Version 2: August 2003






 nljust(1)                                                         nljust(1)




           pr -n file2 | nljust -w 132 -r 132 | lp

 WARNINGS    [Toc]    [Back]
      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 meaningful way.  Similarly, only Latinmode
 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 provided in future HP-UX releases.

 AUTHOR    [Toc]    [Back]
      nljust was developed by HP.

 SEE ALSO    [Toc]    [Back]
      forder(1), lp(1), pr(1), strord(3C).


 Hewlett-Packard Company            - 4 -   HP-UX 11i Version 2: August 2003
[ Back ]
      
      
 Similar pages
Name OS Title
paste IRIX merge same lines of several files or subsequent lines of one file
paste Tru64 Joins corresponding lines of several files or subsequent lines in one file
paste HP-UX merge same lines of several files or subsequent lines of one file
print IRIX printing tools
glp IRIX graphical lp printing command
slp HP-UX set printing options for a non-serial printer
iswprint Linux test for printing wide character
addclient IRIX allow remote printing clients to connect
cancel Tru64 Sends or cancels a printing request
pr Linux convert text files for printing
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service