ptx
ptx [OPTION]... [INPUT]...
ptx -G [OPTION]... [INPUT [OUTPUT]]
Produce a permuted index of file contents Output a permuted index, including context, of the words in the input files. Mandatory arguments to long options are mandatory for short options too. With no FILE, or when FILE is -, read standard input. Default is '-F /'.
Options
--auto-reference
,-A
-
output automatically generated references
--traditional
,-G
-
behave more like System V 'ptx'
--flag-truncation=<STRING>
,-F <STRING>
-
use STRING for flagging line truncations
--macro-name=<STRING>
,-M <STRING>
-
macro name to use instead of 'xx'
--format=roff
,-O
-
generate output as roff directives
--right-side-refs
,-R
-
put references at right, not counted in -w
--sentence-regexp=<REGEXP>
,-S <REGEXP>
-
for end of lines or end of sentences
--format=tex
,-T
-
generate output as TeX directives
--word-regexp=<REGEXP>
,-W <REGEXP>
-
use REGEXP to match each keyword
--break-file=<FILE>
,-b <FILE>
-
word break characters in this FILE
--ignore-case
,-f
-
fold lower case to upper case for sorting
--gap-size=<NUMBER>
,-g <NUMBER>
-
gap size in columns between output fields
--ignore-file=<FILE>
,-i <FILE>
-
read ignore word list from FILE
--only-file=<FILE>
,-o <FILE>
-
read only word list from this FILE
--references=<FILE>
,-r <FILE>
-
first field of each line is a reference
--width=<NUMBER>
,-w <NUMBER>
-
output width in columns, reference excluded
Examples
Generate a permuted index where the first field of each line is an index reference:
ptx --references {{path/to/file}}
Generate a permuted index with automatically generated index references:
ptx --auto-reference {{path/to/file}}
Generate a permuted index with a fixed width:
ptx --width={{width_in_columns}} {{path/to/file}}
Generate a permuted index with a list of filtered words:
ptx --only-file={{path/to/filter}} {{path/to/file}}
Generate a permuted index with SYSV-style behaviors:
ptx --traditional {{path/to/file}}
The examples are provided by the tldr-pages project under the CC BY 4.0 License.
Please note that, as uutils is a work in progress, some examples might fail.