UNIX in a Nutshell: System V Edition

UNIX in a Nutshell: System V EditionSearch this book
Previous: Reference: psChapter 2
UNIX Commands
Next: Reference: pwd
 

ptx

ptx [options] [infile [outfile]]

Solaris 2.0 only. Generate a permuted index from infile and send output to outfile. (Standard input and output are the defaults.) To print the index, format the output file using the -mptx option to nroff or troff.

Options

-b file

In addition to using tab, space, and newline, use the characters in file as word separators.

-f

Fold uppercase and lowercase; i.e., ignore case when sorting keywords.

-g n

Set column gaps in output to n characters.

-i file

Ignore keywords listed in file. Default file is /usr/lib/eign.

-o file

Use only the words in file as keywords (inverse of -i).

-r

Use the first field of infile as a reference ID. This field does not get permuted but appears as the last field of the output.

-t

Prepare output for phototypesetting (default line length is 100 characters).

-w n

Produce output lines n characters wide (default is 72).

Example

Given a three-line input file ptx.in:

ar(1) ar: archive and library maintainer
at(1) at: execute commands at a later time
awk(1) awk: pattern scanning language

A permuted index could be generated as follows:

ptx -f -i ignore -w 80 -r ptx.in > ptx.out
troff -mptx options ptx.out | spooler

In this case, ptx merges uppercase and lowercase (-f) ignores a list of keywords (-i), uses 80-character output lines (-w), and appends the first word (the command name) as a section reference (-r).


Previous: Reference: psUNIX in a Nutshell: System V EditionNext: Reference: pwd
Reference: psBook IndexReference: pwd

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System