coreutils: ptx invocation

 
 7.5 ‘ptx’: Produce permuted indexes
 ===================================
 
 ‘ptx’ reads a text file and essentially produces a permuted index, with
 each keyword in its context.  The calling sketch is either one of:
 
      ptx [OPTION ...] [FILE ...]
      ptx -G [OPTION ...] [INPUT [OUTPUT]]
 
    The ‘-G’ (or its equivalent: ‘--traditional’) option disables all GNU
 extensions and reverts to traditional mode, thus introducing some
 limitations and changing several of the program’s default option values.
 When ‘-G’ is not specified, GNU extensions are always enabled.  GNU
 extensions to ‘ptx’ are documented wherever appropriate in this
 document.  ⇒Compatibility in ptx, for the full list.
 
    Individual options are explained in the following sections.
 
    When GNU extensions are enabled, there may be zero, one or several
 FILEs after the options.  If there is no FILE, the program reads the
 standard input.  If there is one or several FILEs, they give the name of
 input files which are all read in turn, as if all the input files were
 concatenated.  However, there is a full contextual break between each
 file and, when automatic referencing is requested, file names and line
 numbers refer to individual text input files.  In all cases, the program
 outputs the permuted index to the standard output.
 
    When GNU extensions are _not_ enabled, that is, when the program
 operates in traditional mode, there may be zero, one or two parameters
 besides the options.  If there are no parameters, the program reads the
 standard input and outputs the permuted index to the standard output.
 If there is only one parameter, it names the text INPUT to be read
 instead of the standard input.  If two parameters are given, they give
 respectively the name of the INPUT file to read and the name of the
 OUTPUT file to produce.  _Be very careful_ to note that, in this case,
 the contents of file given by the second parameter is destroyed.  This
 behavior is dictated by System V ‘ptx’ compatibility; GNU Standards
 normally discourage output parameters not introduced by an option.
 
    Note that for _any_ file named as the value of an option or as an
 input text file, a single dash ‘-’ may be used, in which case standard
 input is assumed.  However, it would not make sense to use this
 convention more than once per program invocation.
 

Menu